mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Factor out stat collector
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
3bda841e3e
commit
68c879406b
2 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
// +build !windows
|
||||
|
||||
package daemon
|
||||
|
||||
import (
|
31
daemon/stats_collector_windows.go
Normal file
31
daemon/stats_collector_windows.go
Normal file
|
@ -0,0 +1,31 @@
|
|||
package daemon
|
||||
|
||||
import "time"
|
||||
|
||||
// newStatsCollector returns a new statsCollector for collection stats
|
||||
// for a registered container at the specified interval. The collector allows
|
||||
// non-running containers to be added and will start processing stats when
|
||||
// they are started.
|
||||
func newStatsCollector(interval time.Duration) *statsCollector {
|
||||
return &statsCollector{}
|
||||
}
|
||||
|
||||
// statsCollector manages and provides container resource stats
|
||||
type statsCollector struct {
|
||||
}
|
||||
|
||||
// collect registers the container with the collector and adds it to
|
||||
// the event loop for collection on the specified interval returning
|
||||
// a channel for the subscriber to receive on.
|
||||
func (s *statsCollector) collect(c *Container) chan interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// stopCollection closes the channels for all subscribers and removes
|
||||
// the container from metrics collection.
|
||||
func (s *statsCollector) stopCollection(c *Container) {
|
||||
}
|
||||
|
||||
// unsubscribe removes a specific subscriber from receiving updates for a container's stats.
|
||||
func (s *statsCollector) unsubscribe(c *Container, ch chan interface{}) {
|
||||
}
|
Loading…
Reference in a new issue