Skip to content

Commit 2a28684

Browse files
elsesiyPettitWesley
authored andcommitted
examples: Add individual go modules, gitignore & update Dockerfile
Signed-off-by: Jonas-Taha El Sesiy <[email protected]>
1 parent a237b72 commit 2a28684

File tree

7 files changed

+36
-9
lines changed

7 files changed

+36
-9
lines changed

examples/out_gstdout/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
out_gstdout.h
3+
out_gstdout.so

examples/out_gstdout/go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/fluent/fluent-bit-go/examples/gstdout
2+
3+
go 1.14
4+
5+
require github.com/fluent/fluent-bit-go v0.0.0-20200420155746-e125cab17963
6+
7+
replace github.com/fluent/fluent-bit-go => ../..

examples/out_gstdout/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
2+
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
3+
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
4+
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
5+
jithub.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=

examples/out_multiinstance/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
out_multiinstance.h
3+
out_multiinstance.so

examples/out_multiinstance/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.12 as gobuilder
1+
FROM golang:1.14 as gobuilder
22

33
WORKDIR /root
44

@@ -7,16 +7,14 @@ ENV GOOS=linux\
77

88
COPY / /root/
99

10-
RUN go build \
11-
-buildmode=c-shared \
12-
-o /out_multiinstance.so \
13-
github.com/fluent/fluent-bit-go/examples/out_multiinstance
10+
RUN go mod edit -replace github.com/fluent/fluent-bit-go=github.com/fluent/fluent-bit-go@master
11+
RUN go mod download & make all
1412

15-
FROM fluent/fluent-bit:1.1
13+
FROM fluent/fluent-bit:1.4
1614

17-
COPY --from=gobuilder /out_multiinstance.so /fluent-bit/bin/
18-
COPY --from=gobuilder /root/examples/out_multiinstance/fluent-bit.conf /fluent-bit/etc/
19-
COPY --from=gobuilder /root/examples/out_multiinstance/plugins.conf /fluent-bit/etc/
15+
COPY --from=gobuilder /root/out_multiinstance.so /fluent-bit/bin/
16+
COPY --from=gobuilder /root/fluent-bit.conf /fluent-bit/etc/
17+
COPY --from=gobuilder /root/plugins.conf /fluent-bit/etc/
2018

2119
EXPOSE 2020
2220

examples/out_multiinstance/go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/fluent/fluent-bit-go/examples/multiinstance
2+
3+
go 1.14
4+
5+
require github.com/fluent/fluent-bit-go v0.0.0-20200420155746-e125cab17963
6+
7+
replace github.com/fluent/fluent-bit-go => ../..

examples/out_multiinstance/go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
2+
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
3+
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
4+
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=

0 commit comments

Comments
 (0)