Documentation ¶
Index ¶
- Constants
- type MalachiteClient
- func (c *MalachiteClient) GetAllPodContainersStats(ctx context.Context) (map[string]map[string]*types.MalachiteCgroupInfo, error)
- func (c *MalachiteClient) GetCgroupStats(cgroupPath string) (*types.MalachiteCgroupInfo, error)
- func (c *MalachiteClient) GetPodContainerStats(podUID, containerID string) (*types.MalachiteCgroupInfo, error)
- func (c *MalachiteClient) GetPodStats(ctx context.Context, podUID string) (map[string]*types.MalachiteCgroupInfo, error)
- func (c *MalachiteClient) GetSystemComputeStats() (*types.SystemComputeData, error)
- func (c *MalachiteClient) GetSystemIOStats() (*types.SystemDiskIoData, error)
- func (c *MalachiteClient) GetSystemMemoryStats() (*types.SystemMemoryData, error)
- func (c *MalachiteClient) GetSystemNetStats() (*types.SystemNetworkData, error)
- func (c *MalachiteClient) SetURL(urls map[string]string)
- type SystemResourceKind
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 )
Click to show internal directories.
Click to hide internal directories.