client

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CgroupResource     = "cgroup/groups"
	CgroupPathParamKey = "cgroup_user_path"

	SystemIOResource      = "system/io"
	SystemNetResource     = "system/network"
	SystemMemoryResource  = "system/memory"
	SystemComputeResource = "system/compute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MalachiteClient

type MalachiteClient struct {
	// those fields are for testing
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMalachiteClient

func NewMalachiteClient(fetcher pod.PodFetcher) *MalachiteClient

func (*MalachiteClient) GetAllPodContainersStats

func (c *MalachiteClient) GetAllPodContainersStats(ctx context.Context) (map[string]map[string]*types.MalachiteCgroupInfo, error)

func (*MalachiteClient) GetCgroupStats

func (c *MalachiteClient) GetCgroupStats(cgroupPath string) (*types.MalachiteCgroupInfo, error)

func (*MalachiteClient) GetPodContainerStats

func (c *MalachiteClient) GetPodContainerStats(podUID, containerID string) (*types.MalachiteCgroupInfo, error)

func (*MalachiteClient) GetPodStats

func (c *MalachiteClient) GetPodStats(ctx context.Context, podUID string) (map[string]*types.MalachiteCgroupInfo, error)

func (*MalachiteClient) GetSystemComputeStats

func (c *MalachiteClient) GetSystemComputeStats() (*types.SystemComputeData, error)

func (*MalachiteClient) GetSystemIOStats

func (c *MalachiteClient) GetSystemIOStats() (*types.SystemDiskIoData, error)

func (*MalachiteClient) GetSystemMemoryStats

func (c *MalachiteClient) GetSystemMemoryStats() (*types.SystemMemoryData, error)

func (*MalachiteClient) GetSystemNetStats

func (c *MalachiteClient) GetSystemNetStats() (*types.SystemNetworkData, error)

func (*MalachiteClient) SetURL

func (c *MalachiteClient) SetURL(urls map[string]string)

SetURL is used to implement UT for

type SystemResourceKind

type SystemResourceKind int
const (
	Compute SystemResourceKind = iota
	Memory
	IO
	Net
)

Jump to

Keyboard shortcuts

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