77 "io"
88 "os"
99 "strings"
10+ "time"
1011
1112 "github.com/docker/docker/api/types/plugins/logdriver"
1213 protoio "github.com/gogo/protobuf/io"
@@ -132,7 +133,7 @@ func (d *Driver) Parse(ctx context.Context, file, fields, grokMatch, grokPattern
132133}
133134
134135// Log sends messages to Elasticsearch Bulk Service
135- func (d * Driver ) Log (ctx context.Context , file string , config Configuration ) error {
136+ func (d * Driver ) Log (ctx context.Context , file string , workers , actions , size int , flushInterval time. Duration , stats bool , indexName , tzpe string ) error {
136137
137138 c , err := d .getContainer (file )
138139 if err != nil {
@@ -141,7 +142,7 @@ func (d *Driver) Log(ctx context.Context, file string, config Configuration) err
141142
142143 c .pipeline .group .Go (func () error {
143144
144- err : = c .esClient .NewBulkProcessorService (ctx , config . Bulk . workers , config . Bulk . actions , config . Bulk . size , config . Bulk . flushInterval , config . Bulk . stats )
145+ err = c .esClient .NewBulkProcessorService (ctx , workers , actions , size , flushInterval , stats )
145146 if err != nil {
146147 c .logger .WithError (err ).Error ("could not create bulk processor" )
147148 }
@@ -159,7 +160,7 @@ func (d *Driver) Log(ctx context.Context, file string, config Configuration) err
159160
160161 for doc := range c .pipeline .outputCh {
161162
162- c .esClient .Add (c . indexName , config . tzpe , doc )
163+ c .esClient .Add (indexName , tzpe , doc )
163164
164165 select {
165166 case <- ctx .Done ():
0 commit comments