github.com/cilium/cilium@v1.16.2/pkg/endpointmanager/config.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package endpointmanager 5 6 import ( 7 "github.com/spf13/pflag" 8 9 "github.com/cilium/cilium/pkg/option" 10 "github.com/cilium/cilium/pkg/time" 11 ) 12 13 type EndpointManagerConfig struct { 14 // EndpointGCInterval is interval to attempt garbage collection of 15 // endpoints that are no longer alive and healthy. 16 EndpointGCInterval time.Duration 17 } 18 19 func (def EndpointManagerConfig) Flags(flags *pflag.FlagSet) { 20 flags.Duration(option.EndpointGCInterval, def.EndpointGCInterval, 21 "Periodically monitor local endpoint health via link status on this interval and garbage collect them if they become unhealthy, set to 0 to disable") 22 flags.MarkHidden(option.EndpointGCInterval) 23 } 24 25 var defaultEndpointManagerConfig = EndpointManagerConfig{ 26 EndpointGCInterval: 5 * time.Minute, 27 }