diff --git a/beater/server_test.go b/beater/server_test.go index 23c6de56fec..2477f31885e 100644 --- a/beater/server_test.go +++ b/beater/server_test.go @@ -19,6 +19,7 @@ package beater import ( "bytes" + "context" "fmt" "io/ioutil" "net" @@ -406,7 +407,7 @@ func (c *chanClient) Close() error { // Publish will publish every event in the batch on the channel. Options will be ignored. // Always returns without error. -func (c *chanClient) Publish(batch pubs.Batch) error { +func (c *chanClient) Publish(_ context.Context, batch pubs.Batch) error { for _, event := range batch.Events() { select { case <-c.done: @@ -424,7 +425,7 @@ func (c *chanClient) String() string { type dummyOutputClient struct { } -func (d *dummyOutputClient) Publish(batch pubs.Batch) error { +func (d *dummyOutputClient) Publish(_ context.Context, batch pubs.Batch) error { batch.ACK() return nil } diff --git a/go.sum b/go.sum index 16405735f5e..ac99a37554d 100644 --- a/go.sum +++ b/go.sum @@ -905,6 +905,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.0 h1:DMOzIV76tmoDNE9pX6RSN0aDtCYeCg5VueieJaAo1uw= github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= diff --git a/magefile.go b/magefile.go index c6b60ad8f93..51f1c5cd887 100644 --- a/magefile.go +++ b/magefile.go @@ -103,9 +103,7 @@ func Config() error { func shortConfigFileParams() mage.ConfigFileParams { return mage.ConfigFileParams{ - ShortParts: []string{ - mage.OSSBeatDir("_meta/beat.yml"), - }, + Short: mage.ConfigParams{Template: mage.OSSBeatDir("_meta/beat.yml")}, ExtraVars: map[string]interface{}{ "elasticsearch_hostport": "localhost:9200", "listen_hostport": "localhost:" + config.DefaultPort, @@ -117,9 +115,7 @@ func shortConfigFileParams() mage.ConfigFileParams { func dockerConfigFileParams() mage.ConfigFileParams { return mage.ConfigFileParams{ - DockerParts: []string{ - mage.OSSBeatDir("_meta/beat.yml"), - }, + Docker: mage.ConfigParams{Template: mage.OSSBeatDir("_meta/beat.yml")}, ExtraVars: map[string]interface{}{ "elasticsearch_hostport": "elasticsearch:9200", "listen_hostport": "0.0.0.0:" + config.DefaultPort,