client

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

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

Variables

View Source
var DefaultClient = New()

Functions

This section is empty.

Types

type Client

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

func (*Client) GetCgroupStats

func (c *Client) GetCgroupStats(cgroupPath string) ([]byte, error)

func (*Client) GetSystemStats

func (c *Client) GetSystemStats(kind SystemResourceKind) ([]byte, error)

func (*Client) SetURL

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

SetURL is used to implement UT for

type MalachiteClient

type MalachiteClient interface {
	GetCgroupStats(cgroup string) ([]byte, error)
	GetSystemStats(kind SystemResourceKind) ([]byte, error)
}

func New

func New() MalachiteClient

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