@@ -65,7 +65,7 @@ const (
65
65
PodmanNamespace = "podman"
66
66
)
67
67
68
- var HousekeepingConfigFlags = HouskeepingConfig {
68
+ var HousekeepingConfigFlags = HousekeepingConfig {
69
69
flag .Duration ("max_housekeeping_interval" , 60 * time .Second , "Largest interval to allow between container housekeepings" ),
70
70
flag .Bool ("allow_dynamic_housekeeping" , true , "Whether to allow the housekeeping interval to be dynamic" ),
71
71
}
@@ -147,13 +147,13 @@ type Manager interface {
147
147
}
148
148
149
149
// Housekeeping configuration for the manager
150
- type HouskeepingConfig = struct {
150
+ type HousekeepingConfig = struct {
151
151
Interval * time.Duration
152
152
AllowDynamic * bool
153
153
}
154
154
155
155
// New takes a memory storage and returns a new manager.
156
- func New (memoryCache * memory.InMemoryCache , sysfs sysfs.SysFs , houskeepingConfig HouskeepingConfig , includedMetricsSet container.MetricSet , collectorHTTPClient * http.Client , rawContainerCgroupPathPrefixWhiteList , containerEnvMetadataWhiteList []string , perfEventsFile string , resctrlInterval time.Duration ) (Manager , error ) {
156
+ func New (memoryCache * memory.InMemoryCache , sysfs sysfs.SysFs , HousekeepingConfig HousekeepingConfig , includedMetricsSet container.MetricSet , collectorHTTPClient * http.Client , rawContainerCgroupPathPrefixWhiteList , containerEnvMetadataWhiteList []string , perfEventsFile string , resctrlInterval time.Duration ) (Manager , error ) {
157
157
if memoryCache == nil {
158
158
return nil , fmt .Errorf ("manager requires memory storage" )
159
159
}
@@ -200,8 +200,8 @@ func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig
200
200
cadvisorContainer : selfContainer ,
201
201
inHostNamespace : inHostNamespace ,
202
202
startupTime : time .Now (),
203
- maxHousekeepingInterval : * houskeepingConfig .Interval ,
204
- allowDynamicHousekeeping : * houskeepingConfig .AllowDynamic ,
203
+ maxHousekeepingInterval : * HousekeepingConfig .Interval ,
204
+ allowDynamicHousekeeping : * HousekeepingConfig .AllowDynamic ,
205
205
includedMetrics : includedMetricsSet ,
206
206
containerWatchers : []watcher.ContainerWatcher {},
207
207
eventsChannel : eventsChannel ,
0 commit comments