stats

package
v25.0.18+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 168 modules, 166 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector manages and provides container resource stats

func NewCollector

func NewCollector(supervisor supervisor, interval time.Duration) *Collector

NewCollector creates a stats collector that will poll the supervisor with the specified interval

func (*Collector) Collect

func (s *Collector) Collect(c *container.Container) chan interface{}

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

func (s *Collector) StopCollection(c *container.Container)

StopCollection closes the channels for all subscribers and removes the container from metrics collection.

func (*Collector) Unsubscribe

func (s *Collector) Unsubscribe(c *container.Container, ch chan interface{})

Unsubscribe removes a specific subscriber from receiving updates for a container's stats.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL