Extract daemon statsCollector to its own package

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-01-04 18:01:59 +01:00
parent 6129e6ce3e
commit 835971c6fd
11 changed files with 205 additions and 175 deletions

View File

@@ -133,11 +133,11 @@ func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, c
}
func (daemon *Daemon) subscribeToContainerStats(c *container.Container) chan interface{} {
return daemon.statsCollector.collect(c)
return daemon.statsCollector.Collect(c)
}
func (daemon *Daemon) unsubscribeToContainerStats(c *container.Container, ch chan interface{}) {
daemon.statsCollector.unsubscribe(c, ch)
daemon.statsCollector.Unsubscribe(c, ch)
}
// GetContainerStats collects all the stats published by a container