cgnetcls

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package cgnetcls implements functionality to manage classid for processes belonging to different cgroups

Index

Constants

View Source
const (
	// TriremeBasePath is the base path of the Trireme tree in cgroups
	TriremeBasePath = "/trireme"
	// CgroupNameTag is the tag for the cgroup name
	CgroupNameTag = "@cgroup_name"
	// CgroupMarkTag is the tag for the cgroup mark
	CgroupMarkTag = "@cgroup_mark"
	// PortTag is the tag for a port
	PortTag = "@usr:port"

	//Initialmarkval is the start of mark values we assign to cgroup
	Initialmarkval = 100
)

Variables

This section is empty.

Functions

func ListCgroupProcesses

func ListCgroupProcesses(cgroupname string) ([]string, error)

ListCgroupProcesses lists the processes of the cgroup

func MarkVal

func MarkVal() uint64

MarkVal returns a new Mark Value

Types

type Cgroupnetcls

type Cgroupnetcls interface {
	Creategroup(cgroupname string) error
	AssignMark(cgroupname string, mark uint64) error
	AddProcess(cgroupname string, pid int) error
	RemoveProcess(cgroupname string, pid int) error
	DeleteCgroup(cgroupname string) error
	Deletebasepath(contextID string) bool
}

Cgroupnetcls interface exposing methods that can be called from outside to manage net_cls cgroups

func NewCgroupNetController

func NewCgroupNetController(releasePath string) Cgroupnetcls

NewCgroupNetController returns a handle to call functions on the cgroup net_cls controller

func NewDockerCgroupNetController added in v1.0.3

func NewDockerCgroupNetController() Cgroupnetcls

NewDockerCgroupNetController returns a handle to call functions on the cgroup net_cls controller

Directories

Path Synopsis
nolint
nolint

Jump to

Keyboard shortcuts

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