Documentation
¶
Index ¶
- Constants
- func GetCgroupIdFromPath(cgroupPath string) (uint64, error)
- func GetSystemConfig() (map[string]string, error)
- func IsContainer() (bool, error)
- func IsEnableBPF() (bool, error)
- func IsEnableBTF() (bool, error)
- func PrepareInsnPatchers(m *manager.Manager, ebpfFuncs []string, pcapFilter string) []manager.InstructionPatcherFunc
- type UnameInfo
Constants ¶
View Source
const ( ProcContainerCgroupPath = "/proc/1/cgroup" ProcContainerSchedPath = "/proc/1/sched" )
View Source
const ( SysKernelBtfVmlinux = "/sys/kernel/btf/vmlinux" ConfigDebugInfoBtf = "CONFIG_DEBUG_INFO_BTF" )
Variables ¶
This section is empty.
Functions ¶
func GetCgroupIdFromPath ¶
GetCgroupIdFromPath returns the cgroup ID for the given cgroup v2 path. The cgroup ID is obtained via the file handle of the cgroup directory, which matches the value returned by bpf_get_current_cgroup_id() in eBPF programs. Returns 0 if cgroupPath is empty.
func GetSystemConfig ¶
func IsContainer ¶
IsContainer returns true if the process is running in a container.
func IsEnableBTF ¶
func PrepareInsnPatchers ¶
func PrepareInsnPatchers(m *manager.Manager, ebpfFuncs []string, pcapFilter string) []manager.InstructionPatcherFunc
PrepareInsnPatchers prepares instruction patcher functions for the given eBPF functions and pcap filter. This stub returns an empty list; pcap filtering is only available when built with -tags dynamic.
Types ¶
Click to show internal directories.
Click to hide internal directories.