procfs

package
v0.0.0-...-bb44ddd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

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

type FakeProcFs struct{}

func (*FakeProcFs) GetFullContainerName

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

type ProcFs struct{}

func (*ProcFs) GetFullContainerName

func (pfs *ProcFs) 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 ProcFsInterface

type ProcFsInterface interface {
	// getFullContainerName gets the container name given the root process id of the container.
	GetFullContainerName(pid int) (string, error)
}

func NewFakeProcFs

func NewFakeProcFs() ProcFsInterface

func NewProcFs

func NewProcFs() ProcFsInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL