cgnetcls

package
v10.323.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

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

Index

Constants

View Source
const (
	// CgroupNameTag  identifies the cgroup name
	CgroupNameTag = "@cgroup_name"
	// CgroupMarkTag identifies the cgroup mark value
	CgroupMarkTag = "@cgroup_mark"
	// PortTag is the tag for the port values
	PortTag = "port"
)

Variables

This section is empty.

Functions

func CgroupMemberCount

func CgroupMemberCount(cgroupName string) int

CgroupMemberCount -- Returns the cound of the number of processes in a cgroup TODO: looks like dead code

func ConfigureNetClsPath

func ConfigureNetClsPath(path string)

ConfigureNetClsPath updates the cgroupNetCls path

func GetAssignedMarkVal

func GetAssignedMarkVal(cgroupName string) string

GetAssignedMarkVal -- returns the mark val assigned to the group TODO: looks like dead code

func GetCgroupList

func GetCgroupList() []string

GetCgroupList geta list of all cgroup names TODO: only used in autoport detection, and a bad usage as well

func ListCgroupProcesses

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

ListCgroupProcesses lists the cgroups that trireme has created TODO: only used in autoport detection, and a bad usage as well

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
	AssignRootMark(mark uint64) error
	AddProcess(cgroupname string, pid int) error
	RemoveProcess(cgroupname string, pid int) error
	DeleteCgroup(cgroupname string) error
	Deletebasepath(contextID string) bool
	ListCgroupProcesses(cgroupname string) ([]string, error)
	ListAllCgroups(path string) []string
}

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

func NewCgroupNetController

func NewCgroupNetController(triremepath string, releasePath string) Cgroupnetcls

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

func NewDockerCgroupNetController

func NewDockerCgroupNetController() Cgroupnetcls

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

Directories

Path Synopsis
Package mockcgnetcls is a generated GoMock package.
Package mockcgnetcls is a generated GoMock package.

Jump to

Keyboard shortcuts

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