Close() error
This commit is contained in:
parent
9d8d40c239
commit
a010934299
@ -204,6 +204,13 @@ func (self *InMemoryStorage) Percentiles(name string, cpuPercentiles, memPercent
|
||||
return cstore.Percentiles(cpuPercentiles, memPercentiles)
|
||||
}
|
||||
|
||||
func (self *InMemoryStorage) Close() error {
|
||||
self.lock.Lock()
|
||||
self.containerStorageMap = make(map[string]*containerStorage, 32)
|
||||
self.lock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func New(maxNumSamples, maxNumStats int) storage.StorageDriver {
|
||||
ret := &InMemoryStorage{
|
||||
containerStorageMap: make(map[string]*containerStorage, 32),
|
||||
|
@ -32,4 +32,6 @@ type StorageDriver interface {
|
||||
// the number of returned samples is implementation defined. Otherwise, the driver
|
||||
// should return at most numSamples samples.
|
||||
Samples(containername string, numSamples int) ([]*info.ContainerStatsSample, error)
|
||||
|
||||
Close() error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user