specs

package
v0.0.0-...-205da4a Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClockTicks float64 = 100 // default value

)

Functions

func CgroupCreate

func CgroupCreate(path string) (*Pod, *Container)

func CgroupDelete

func CgroupDelete(path string) (*Pod, *Container)

func GetAncestors

func GetAncestors(pid int) []int

func GetAttackGraph

func GetAttackGraph(pid int) []*apis.ProcessSpec

func GetContainerIDs

func GetContainerIDs() []string

func GetHostMountNsID

func GetHostMountNsID() uint32

func GetProcessIDs

func GetProcessIDs() []int

func Load

func Load(ctx context.Context) error

func ProcessClone

func ProcessClone(process *Process)

func ProcessExit

func ProcessExit(pid int)

Types

type Container

type Container struct {
	*apis.ContainerSpec

	RuncPid   int
	MountNsID uint32
	// contains filtered or unexported fields
}

func GetContainer

func GetContainer(id string) (*Container, error)

func GetContainerByMountID

func GetContainerByMountID(id uint32) (*Container, error)

type Each

type Each interface {
	Containers(fn func(*Container))
	Pods(fn func(*Pod))
	Processes(fn func(*Process))
}

func ForEach

func ForEach() Each

type Group

type Group struct {
	Gid   string
	Name  string
	Users []string
}

func LookupGroup

func LookupGroup(uid int) *Group

func LookupGroupByContainer

func LookupGroupByContainer(uid int, containerId string) *Group

func LookupGroupByPid

func LookupGroupByPid(uid, pid int) *Group

type Pod

type Pod struct {
	*apis.PodSpec
	// contains filtered or unexported fields
}

func GetPod

func GetPod(uid string) (*Pod, error)

type Process

type Process struct {
	*apis.ProcessSpec

	Uid       int
	Gid       int
	MountNsID uint32
	NetNsID   uint32
	// contains filtered or unexported fields
}

func GetProcess

func GetProcess(pid int) (*Process, error)

type User

type User struct {
	Uid   string
	Gid   string
	Name  string
	Home  string
	Shell string
}

func LookupUser

func LookupUser(uid int) *User

func LookupUserByContainer

func LookupUserByContainer(uid int, containerId string) *User

func LookupUserByPid

func LookupUserByPid(uid, pid int) *User

Jump to

Keyboard shortcuts

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