trireme-lib: go.aporeto.io/trireme-lib/utils/cgnetcls Index | Files | Directories

package cgnetcls

import "go.aporeto.io/trireme-lib/utils/cgnetcls"

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

Index

Package Files

cgnetcls.go constants.go interfaces.go netcls.go

Constants

const (
    // TriremeBasePath is the base path for the trireme local state in the file system
    TriremeBasePath = "trireme"
    // 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"

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

func CgroupMemberCount Uses

func CgroupMemberCount(cgroupName string) int

CgroupMemberCount -- Returns the cound of the number of processes in a cgroup

func GetAssignedMarkVal Uses

func GetAssignedMarkVal(cgroupName string) string

GetAssignedMarkVal -- returns the mark val assigned to the group

func GetCgroupList Uses

func GetCgroupList() []string

GetCgroupList geta list of all cgroup names

func ListCgroupProcesses Uses

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

ListCgroupProcesses lists the cgroups that trireme has created

func MarkVal Uses

func MarkVal() uint64

MarkVal returns a new Mark Value

type Cgroupnetcls Uses

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
    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 Uses

func NewCgroupNetController(triremepath string, releasePath string) Cgroupnetcls

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

func NewDockerCgroupNetController Uses

func NewDockerCgroupNetController() Cgroupnetcls

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

Directories

PathSynopsis
mockcgnetclsPackage mockcgnetcls is a generated GoMock package.

Package cgnetcls imports 12 packages (graph) and is imported by 8 packages. Updated 2018-11-15. Refresh now. Tools for package owners.