From 4ea05a553547d22b705ef3a6ee80cb28c8090080 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Mon, 8 Apr 2024 10:54:59 +0200 Subject: [PATCH] PR improvements Rename `CleanTimeout` to `CleanInactive` --- .../input/filestream/internal/input-logfile/manager.go | 6 +++--- filebeat/input/v2/input-cursor/manager.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/filebeat/input/filestream/internal/input-logfile/manager.go b/filebeat/input/filestream/internal/input-logfile/manager.go index 8d80127a3e6e..ec25ff60b2f0 100644 --- a/filebeat/input/filestream/internal/input-logfile/manager.go +++ b/filebeat/input/filestream/internal/input-logfile/manager.go @@ -165,9 +165,9 @@ func (cim *InputManager) Create(config *conf.C) (v2.Input, error) { settings := struct { ID string `config:"id"` - CleanTimeout time.Duration `config:"clean_inactive"` + CleanInactive time.Duration `config:"clean_inactive"` HarvesterLimit uint64 `config:"harvester_limit"` - }{CleanTimeout: cim.DefaultCleanTimeout} + }{CleanInactive: cim.DefaultCleanTimeout} if err := config.Unpack(&settings); err != nil { return nil, err } @@ -230,7 +230,7 @@ func (cim *InputManager) Create(config *conf.C) (v2.Input, error) { prospector: prospector, harvester: harvester, sourceIdentifier: sourceIdentifier, - cleanTimeout: settings.CleanTimeout, + cleanTimeout: settings.CleanInactive, harvesterLimit: settings.HarvesterLimit, }, nil } diff --git a/filebeat/input/v2/input-cursor/manager.go b/filebeat/input/v2/input-cursor/manager.go index e9156a74f790..74dd8a3bd342 100644 --- a/filebeat/input/v2/input-cursor/manager.go +++ b/filebeat/input/v2/input-cursor/manager.go @@ -153,9 +153,9 @@ func (cim *InputManager) Create(config *conf.C) (v2.Input, error) { } settings := struct { - ID string `config:"id"` - CleanTimeout time.Duration `config:"clean_inactive"` - }{ID: "", CleanTimeout: cim.DefaultCleanTimeout} + ID string `config:"id"` + CleanInactive time.Duration `config:"clean_inactive"` + }{ID: "", CleanInactive: cim.DefaultCleanTimeout} if err := config.Unpack(&settings); err != nil { return nil, err } @@ -176,7 +176,7 @@ func (cim *InputManager) Create(config *conf.C) (v2.Input, error) { userID: settings.ID, sources: sources, input: inp, - cleanTimeout: settings.CleanTimeout, + cleanTimeout: settings.CleanInactive, }, nil }