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 string, pid uint32)
- func (cr *Resolver) GetWorkload(id string) (*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 ¶
DelPIDWithID removes a PID from the cgroup cache entry referenced by the provided ID
func (*Resolver) GetWorkload ¶
func (cr *Resolver) GetWorkload(id string) (*cgroupModel.CacheEntry, bool)
GetWorkload returns the workload referenced by the provided ID
type ResolverInterface ¶
type ResolverInterface interface { Start(context.Context) AddPID(*model.ProcessCacheEntry) GetWorkload(string) (*cgroupModel.CacheEntry, bool) DelPID(uint32) DelPIDWithID(string, 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.