package stats
import "github.com/docker/cli/components/engine/daemon/stats"
Index ¶
- type Collector
- func NewCollector(supervisor supervisor, interval time.Duration) *Collector
- func (s *Collector) Collect(c *container.Container) chan interface{}
- func (s *Collector) Run()
- func (s *Collector) StopCollection(c *container.Container)
- func (s *Collector) Unsubscribe(c *container.Container, ch chan interface{})
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector manages and provides container resource stats
func NewCollector ¶
NewCollector creates a stats collector that will poll the supervisor with the specified interval
func (*Collector) Collect ¶
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 (*Collector) Run ¶
func (s *Collector) Run()
Run starts the collectors and will indefinitely collect stats from the supervisor
func (*Collector) StopCollection ¶
StopCollection closes the channels for all subscribers and removes the container from metrics collection.
func (*Collector) Unsubscribe ¶
Unsubscribe removes a specific subscriber from receiving updates for a container's stats.
Source Files ¶
collector.go collector_unix.go types.go
- Version
- v17.10.0-ce+incompatible
- Published
- Oct 17, 2017
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 3 hours ago –
Tools for package owners.