statsserver

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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