procfs

package module
v0.0.0-...-cc7f265 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...CollectorOption) metadatax.Collector

Types

type CollectorOption

type CollectorOption func(*collector)

func CollectorWithExtractENVs

func CollectorWithExtractENVs() CollectorOption

func CollectorWithMetadataContainerInitFunc

func CollectorWithMetadataContainerInitFunc(fn func() metadatax.MetadataContainer) CollectorOption

func CollectorWithProcessInfoFunc

func CollectorWithProcessInfoFunc(fn ProcessInfoFunc) CollectorOption

type ProcessInfo

type ProcessInfo interface {
	NameWithContext(ctx context.Context) (string, error)
	CmdlineWithContext(ctx context.Context) (string, error)
	UidsWithContext(ctx context.Context) ([]int32, error)
	GidsWithContext(ctx context.Context) ([]int32, error)
	GroupsWithContext(ctx context.Context) ([]int32, error)
	EnvironWithContext(ctx context.Context) ([]string, error)
	ExeWithContext(ctx context.Context) (string, error)
}

type ProcessInfoFunc

type ProcessInfoFunc func(ctx context.Context, pid int32) (ProcessInfo, error)

Jump to

Keyboard shortcuts

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