Add Start() function to DockerLogs input plugin (#6157)
This commit is contained in:
parent
ac10714332
commit
eb0f493998
|
@ -68,6 +68,8 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
containerStates = []string{"created", "restarting", "running", "removing", "paused", "exited", "dead"}
|
containerStates = []string{"created", "restarting", "running", "removing", "paused", "exited", "dead"}
|
||||||
|
// ensure *DockerLogs implements telegaf.ServiceInput
|
||||||
|
_ telegraf.ServiceInput = (*DockerLogs)(nil)
|
||||||
)
|
)
|
||||||
|
|
||||||
type DockerLogs struct {
|
type DockerLogs struct {
|
||||||
|
@ -380,6 +382,12 @@ func tailMultiplexed(
|
||||||
return err
|
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() {
|
func (d *DockerLogs) Stop() {
|
||||||
d.cancelTails()
|
d.cancelTails()
|
||||||
d.wg.Wait()
|
d.wg.Wait()
|
||||||
|
|
Loading…
Reference in New Issue