Documentation ¶
Overview ¶
Package cgroup holds cgroup related files
Index ¶
- type Event
- type Resolver
- func (cr *Resolver) AddPID(process *model.ProcessCacheEntry)
- func (cr *Resolver) DelPID(pid uint32)
- func (cr *Resolver) DelPIDWithID(id containerutils.ContainerID, pid uint32)
- func (cr *Resolver) Get(id containerutils.CGroupID) (*cgroupModel.CacheEntry, bool)
- func (cr *Resolver) GetWorkload(id containerutils.ContainerID) (*cgroupModel.CacheEntry, bool)
- func (cr *Resolver) Len() int
- func (cr *Resolver) Start(_ context.Context)
- type ResolverInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct { *utils.Notifier[Event, *cgroupModel.CacheEntry] sync.RWMutex // contains filtered or unexported fields }
Resolver defines a cgroup monitor
func (*Resolver) AddPID ¶
func (cr *Resolver) AddPID(process *model.ProcessCacheEntry)
AddPID associates a container id and a pid which is expected to be the pid 1
func (*Resolver) DelPIDWithID ¶
func (cr *Resolver) DelPIDWithID(id containerutils.ContainerID, pid uint32)
DelPIDWithID removes a PID from the cgroup cache entry referenced by the provided ID
func (*Resolver) Get ¶
func (cr *Resolver) Get(id containerutils.CGroupID) (*cgroupModel.CacheEntry, bool)
Get returns the workload referenced by the provided ID
func (*Resolver) GetWorkload ¶
func (cr *Resolver) GetWorkload(id containerutils.ContainerID) (*cgroupModel.CacheEntry, bool)
GetWorkload returns the workload referenced by the provided ID
type ResolverInterface ¶
type ResolverInterface interface { Start(context.Context) AddPID(*model.ProcessCacheEntry) GetWorkload(containerutils.ContainerID) (*cgroupModel.CacheEntry, bool) DelPID(uint32) DelPIDWithID(containerutils.ContainerID, uint32) Len() int RegisterListener(Event, utils.Listener[*cgroupModel.CacheEntry]) error }
ResolverInterface defines the interface implemented by a cgroup resolver
Click to show internal directories.
Click to hide internal directories.