Add Start() function to DockerLogs input plugin (#6157)

This commit is contained in:
George 2019-07-24 01:00:07 +02:00 committed by Daniel Nelson
parent ac10714332
commit eb0f493998
1 changed files with 8 additions and 0 deletions

View File

@ -68,6 +68,8 @@ const (
var (
containerStates = []string{"created", "restarting", "running", "removing", "paused", "exited", "dead"}
// ensure *DockerLogs implements telegaf.ServiceInput
_ telegraf.ServiceInput = (*DockerLogs)(nil)
)
type DockerLogs struct {
@ -380,6 +382,12 @@ func tailMultiplexed(
return err
}
// Start is a noop which is required for a *DockerLogs to implement
// the telegraf.ServiceInput interface
func (d *DockerLogs) Start(telegraf.Accumulator) error {
return nil
}
func (d *DockerLogs) Stop() {
d.cancelTails()
d.wg.Wait()