Documentation ¶
Index ¶
- type StatsServer
- func (ss *StatsServer) RemoveStatsForContainer(c *oci.Container)
- func (ss *StatsServer) RemoveStatsForSandbox(sb *sandbox.Sandbox)
- func (ss *StatsServer) Shutdown()
- func (ss *StatsServer) StatsForContainer(c *oci.Container, sb *sandbox.Sandbox) *types.ContainerStats
- func (ss *StatsServer) StatsForContainers(ctrs []*oci.Container) []*types.ContainerStats
- func (ss *StatsServer) StatsForSandbox(sb *sandbox.Sandbox) *types.PodSandboxStats
- func (ss *StatsServer) StatsForSandboxes(sboxes []*sandbox.Sandbox) []*types.PodSandboxStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatsServer ¶
type StatsServer struct {
// contains filtered or unexported fields
}
StatsServer is responsible for maintaining a list of container and sandbox stats. If collectionPeriod is > 0, it maintains this list by updating the stats on collectionPeriod frequency. Otherwise, it only updates the stats as they're requested.
func New ¶
func New(cs parentServerIface) *StatsServer
New returns a new StatsServer, deriving the needed information from the provided parentServerIface.
func (*StatsServer) RemoveStatsForContainer ¶
func (ss *StatsServer) RemoveStatsForContainer(c *oci.Container)
RemoveStatsForContainer removes the saved entry for the specified container to prevent the map from always growing.
func (*StatsServer) RemoveStatsForSandbox ¶
func (ss *StatsServer) RemoveStatsForSandbox(sb *sandbox.Sandbox)
RemoveStatsForSandbox removes the saved entry for the specified sandbox to prevent the map from always growing.
func (*StatsServer) Shutdown ¶
func (ss *StatsServer) Shutdown()
Shutdown tells the updateLoop to stop updating.
func (*StatsServer) StatsForContainer ¶
func (ss *StatsServer) StatsForContainer(c *oci.Container, sb *sandbox.Sandbox) *types.ContainerStats
StatsForContainer returns the stats for the given container
func (*StatsServer) StatsForContainers ¶
func (ss *StatsServer) StatsForContainers(ctrs []*oci.Container) []*types.ContainerStats
StatsForContainers returns the stats for the given list of containers
func (*StatsServer) StatsForSandbox ¶
func (ss *StatsServer) StatsForSandbox(sb *sandbox.Sandbox) *types.PodSandboxStats
StatsForSandbox returns the stats for the given sandbox
func (*StatsServer) StatsForSandboxes ¶
func (ss *StatsServer) StatsForSandboxes(sboxes []*sandbox.Sandbox) []*types.PodSandboxStats
StatsForSandboxes returns the stats for the given list of sandboxes