Documentation ¶
Index ¶
- Constants
- Variables
- func StatPSI(dirPath string, file string) (*castaipb.PSIStats, error)
- type Cgroup
- type Client
- func (c *Client) CleanupCgroup(id ID)
- func (c *Client) DefaultCgroupVersion() Version
- func (c *Client) GetCgroupByContainerID(containerID string) (*Cgroup, error)
- func (c *Client) GetCgroupByID(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 Stats
- type Version
Constants ¶
View Source
const ( V1 = iota V2 )
View Source
const UnifiedMountpoint = "/sys/fs/cgroup"
Variables ¶
View Source
var (
ErrCgroupNotFound = errors.New("cgroup not found")
)
View Source
var ErrStatsNotFound = errors.New("stats not found")
Functions ¶
Types ¶
type Cgroup ¶
type Cgroup struct { Id uint64 ContainerRuntime ContainerRuntimeID ContainerID string // contains filtered or unexported fields }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CleanupCgroup ¶ added in v1.3.0
func (*Client) DefaultCgroupVersion ¶
func (*Client) GetCgroupByContainerID ¶ added in v1.32.0
func (*Client) GetCgroupByID ¶ added in v1.32.0
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
Click to show internal directories.
Click to hide internal directories.