Documentation ¶
Overview ¶
Package procfs implements utility functions relating to the /proc mount.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeProcFS ¶ added in v0.3.0
type FakeProcFS struct{}
func (*FakeProcFS) GetFullContainerName ¶ added in v0.3.0
func (fakePfs *FakeProcFS) GetFullContainerName(pid int) (string, error)
GetFullContainerName gets the container name given the root process id of the container. Eg. If the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.
type ProcFS ¶ added in v0.3.0
type ProcFS struct{}
func (*ProcFS) GetFullContainerName ¶ added in v0.3.0
getFullContainerName gets the container name given the root process id of the container. Eg. If the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.
type ProcFSInterface ¶ added in v0.3.0
type ProcFSInterface interface { // GetFullContainerName gets the container name given the root process id of the container. GetFullContainerName(pid int) (string, error) }
func NewFakeProcFS ¶ added in v0.3.0
func NewFakeProcFS() ProcFSInterface
func NewProcFS ¶ added in v0.3.0
func NewProcFS() ProcFSInterface
Click to show internal directories.
Click to hide internal directories.