stats_collector_solaris.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. package daemon
  2. import (
  3. "github.com/docker/docker/container"
  4. "time"
  5. )
  6. // newStatsCollector returns a new statsCollector for collection stats
  7. // for a registered container at the specified interval. The collector allows
  8. // non-running containers to be added and will start processing stats when
  9. // they are started.
  10. func (daemon *Daemon) newStatsCollector(interval time.Duration) *statsCollector {
  11. return &statsCollector{}
  12. }
  13. // statsCollector manages and provides container resource stats
  14. type statsCollector struct {
  15. }
  16. // collect registers the container with the collector and adds it to
  17. // the event loop for collection on the specified interval returning
  18. // a channel for the subscriber to receive on.
  19. func (s *statsCollector) collect(c *container.Container) chan interface{} {
  20. return nil
  21. }
  22. // stopCollection closes the channels for all subscribers and removes
  23. // the container from metrics collection.
  24. func (s *statsCollector) stopCollection(c *container.Container) {
  25. }
  26. // unsubscribe removes a specific subscriber from receiving updates for a container's stats.
  27. func (s *statsCollector) unsubscribe(c *container.Container, ch chan interface{}) {
  28. }