Documentation ¶
Index ¶
- Constants
- Variables
- func Init() error
- type CPUStat
- type Cgroup
- type Client
- func (c *Client) CleanupCgroup(id ID)
- func (c *Client) DefaultCgroupVersion() Version
- func (c *Client) GetCgroupForID(cgroupID ID) (*Cgroup, error)
- func (c *Client) GetCgroupsRootPath() string
- func (c *Client) IsDefaultHierarchy(hierarchyID uint32) bool
- func (c *Client) LoadCgroup(id ID, path string)
- type ContainerRuntimeID
- type ID
- type IOStat
- type MemoryStat
- type Version
Constants ¶
View Source
const ( V1 = iota V2 )
Variables ¶
View Source
var ( ErrContainerIDNotFoundInCgroupPath = errors.New("container id not found in cgroup path") ErrCgroupNotFound = errors.New("cgroup not found") )
Functions ¶
Types ¶
type Cgroup ¶
type Cgroup struct { Id uint64 Version Version ContainerRuntime ContainerRuntimeID ContainerID string Path string // contains filtered or unexported fields }
func (*Cgroup) MemoryStat ¶
func (cg *Cgroup) MemoryStat() (*MemoryStat, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CleanupCgroup ¶ added in v1.3.0
func (*Client) DefaultCgroupVersion ¶
func (*Client) GetCgroupsRootPath ¶ added in v1.22.0
func (*Client) IsDefaultHierarchy ¶ added in v1.4.0
func (*Client) LoadCgroup ¶ added in v1.3.0
type ContainerRuntimeID ¶ added in v1.3.0
type ContainerRuntimeID int
Represents the internal ID of a container runtime
const ( UnknownRuntime ContainerRuntimeID = iota DockerRuntime ContainerdRuntime CrioRuntime PodmanRuntime GardenRuntime )
func FromString ¶ added in v1.3.0
func FromString(str string) ContainerRuntimeID
func GetContainerIdFromCgroup ¶ added in v1.15.0
func GetContainerIdFromCgroup(cgroupPath string) (string, ContainerRuntimeID)
GetContainerIdFromCgroup extracts container id and its runtime from path. It returns the container id and the used runtime.
func (ContainerRuntimeID) String ¶ added in v1.3.0
func (runtime ContainerRuntimeID) String() string
type MemoryStat ¶
Click to show internal directories.
Click to hide internal directories.