Documentation ¶
Index ¶
- Constants
- func DumpJSON(r interface{}) string
- func GetContainerCgroupDir(parentDir, containerID string) string
- func GetProcessesInContainer(cgroupParentDir, podID, containerID string) ([]string, error)
- func GetTasksInContainer(cgroupParentDir, podID, containerID string) ([]string, error)
- func ParseEnabled(value string) (bool, error)
- func ServerActiveAt(socket string) bool
- func SortUint64s(a []uint64)
- func UncompressTbz2(archive string, dir string) error
- func WaitForServer(socket string, timeout time.Duration, opts ...interface{}) error
- type Uint64Slice
Constants ¶
View Source
const (
CpusetCgroupDir = "/sys/fs/cgroup/cpuset"
)
Variables ¶
This section is empty.
Functions ¶
func DumpJSON ¶
func DumpJSON(r interface{}) string
DumpJSON dumps a json-compatible struct in human-readable form
func GetContainerCgroupDir ¶
GetContainerCgroupDir brute-force searches for a container directory under parentDir.
func GetProcessesInContainer ¶ added in v0.4.0
GetProcessesInContainer gets the IDs of all processes in the container.
func GetTasksInContainer ¶ added in v0.4.0
GetTasksInContainer gets the IDs of all tasks in the container.
func ParseEnabled ¶
ParseEnabled returns whether the given string represents an 'enabled' state.
func ServerActiveAt ¶
ServerActiveAt checks if a gRPC server is accepting connections at the socket.
func SortUint64s ¶
func SortUint64s(a []uint64)
SortUint64s sorts a slice of uint64 in increasing order.
func UncompressTbz2 ¶ added in v0.5.0
Types ¶
type Uint64Slice ¶
type Uint64Slice []uint64
Uint64Slice implmenents sort.Interface for a slice of uint64.
func (Uint64Slice) Less ¶
func (s Uint64Slice) Less(i, j int) bool
Less returns true if element at 'i' is less than the element at 'j'
Click to show internal directories.
Click to hide internal directories.