Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const DefaultBlockProfileRate + const DefaultMutexProfileRate + var ErrInvalidFiles = errors.New("exactly one file must be provided") + func ContainerUsage(kr *kernel.Kernel) map[string]uint64 + func ExecAsync(proc *Proc, args *ExecArgs) (*kernel.ThreadGroup, kernel.ThreadID, *host.TTYFileDescription, error) + func PrintPIDsJSON(pl []*Process) (string, error) + func ProcessListToJSON(pl []*Process) (string, error) + func ProcessListToTable(pl []*Process) string + func Processes(k *kernel.Kernel, containerID string, out *[]*Process) error + type BlockProfileOpts struct + Duration time.Duration + Rate int + type CPUProfileOpts struct + Duration time.Duration + type CatOpts struct + Files []string + type CgroupControlFile struct + Controller string + Name string + Path string + type Cgroups struct + Kernel *kernel.Kernel + func (c *Cgroups) ReadControlFiles(args *CgroupsReadArgs, out *CgroupsResults) error + func (c *Cgroups) WriteControlFiles(args *CgroupsWriteArgs, out *CgroupsResults) error + type CgroupsReadArg struct + File CgroupControlFile + type CgroupsReadArgs struct + Args []CgroupsReadArg + type CgroupsResult struct + Data string + IsError bool + func (r *CgroupsResult) AsError() error + func (r *CgroupsResult) Unpack() (string, error) + type CgroupsResults struct + Results []CgroupsResult + type CgroupsWriteArg struct + File CgroupControlFile + Value string + type CgroupsWriteArgs struct + Args []CgroupsWriteArg + type Container struct + type ContainerArgs struct + ContainerID string + type Events struct + func (e *Events) AttachDebugEmitter(o *EventsOpts, _ *struct{}) error + type EventsOpts struct + type ExecArgs struct + Argv []string + Capabilities *auth.TaskCapabilities + ContainerID string + Envv []string + ExtraKGIDs []auth.KGID + Filename string + KGID auth.KGID + KUID auth.KUID + Limits *limits.LimitSet + MountNamespace *vfs.MountNamespace + PIDNamespace *kernel.PIDNamespace + StdioIsPty bool + WorkingDirectory string + func (args *ExecArgs) String() string + type FilePayload struct + GuestFDs []int + func NewFilePayload(fdMap map[int]*os.File, execFile *os.File) FilePayload + type Fs struct + Kernel *kernel.Kernel + func (f *Fs) Cat(o *CatOpts, _ *struct{}) error + type GetRegisteredMetricsOpts struct + type GoroutineProfileOpts struct + type HeapProfileOpts struct + Delay time.Duration + type Lifecycle struct + Kernel *kernel.Kernel + MountNamespacesMap map[string]*vfs.MountNamespace + ShutdownCh chan struct{} + func (l *Lifecycle) GetExitStatus(args *ContainerArgs, status *uint32) error + func (l *Lifecycle) IsContainerRunning(args *ContainerArgs, isRunning *bool) error + func (l *Lifecycle) Pause(_, _ *struct{}) error + func (l *Lifecycle) Reap(args *ContainerArgs, _ *struct{}) error + func (l *Lifecycle) Resume(_, _ *struct{}) error + func (l *Lifecycle) Shutdown(_, _ *struct{}) error + func (l *Lifecycle) SignalContainer(args *SignalContainerArgs, _ *struct{}) error + func (l *Lifecycle) StartContainer(args *StartContainerArgs, _ *uint32) error + type Logging struct + func (l *Logging) Change(args *LoggingArgs, code *int) error + type LoggingArgs struct + EnableStrace bool + Level log.Level + LogPackets bool + SetEventStrace bool + SetLevel bool + SetLogPackets bool + SetStrace bool + StraceAllowlist []string + StraceEventAllowlist []string + type MemoryUsage struct + Anonymous uint64 + Mapped uint64 + PageCache uint64 + Ramdiskfs uint64 + System uint64 + Tmpfs uint64 + Total uint64 + Unknown uint64 + type MemoryUsageFile struct + type MemoryUsageFileOpts struct + Version uint64 + type MemoryUsageOpts struct + Full bool + type MemoryUsageRecord struct + func NewMemoryUsageRecord(usageFile, platformFile os.File) (*MemoryUsageRecord, error) + func (m *MemoryUsageRecord) Fetch() (mapped, unknown, total uint64, err error) + type Metrics struct + func (u *Metrics) Export(opts *MetricsExportOpts, out *MetricsExportData) error + func (u *Metrics) GetRegisteredMetrics(_ *GetRegisteredMetricsOpts, out *MetricsRegistrationResponse) error + type MetricsExportData struct + Snapshot *prometheus.Snapshot + type MetricsExportOpts struct + OnlyMetrics string + func (m *MetricsExportOpts) Verify(data *MetricsExportData) error + type MetricsRegistrationResponse struct + RegisteredMetrics *pb.MetricRegistration + type MutexProfileOpts struct + Duration time.Duration + Fraction int + type Proc struct + Kernel *kernel.Kernel + func (proc *Proc) Exec(args *ExecArgs, waitStatus *uint32) error + func (proc *Proc) Ps(args *PsArgs, out *string) error + type Process struct + C int32 + Cmd string + PID kernel.ThreadID + PPID kernel.ThreadID + STime string + TTY string + Threads []kernel.ThreadID + Time string + UID auth.KUID + type Profile struct + func NewProfile(k *kernel.Kernel) *Profile + func (p *Profile) Block(o *BlockProfileOpts, _ *struct{}) error + func (p *Profile) CPU(o *CPUProfileOpts, _ *struct{}) error + func (p *Profile) Goroutine(o *GoroutineProfileOpts, _ *struct{}) error + func (p *Profile) Heap(o *HeapProfileOpts, _ *struct{}) error + func (p *Profile) Mutex(o *MutexProfileOpts, _ *struct{}) error + func (p *Profile) Stop() + func (p *Profile) Trace(o *TraceProfileOpts, _ *struct{}) error + type PsArgs struct + JSON bool + type SaveOpts struct + HavePagesFile bool + Key []byte + Metadata map[string]string + Resume bool + type SignalContainerArgs struct + ContainerID string + SignalAll bool + Signo int32 + type StartContainerArgs struct + Argv []string + ContainerID string + DonatedFDs []int + Envv []string + Filename string + InitialCgroups map[kernel.CgroupControllerType]string + KGID auth.KGID + KUID auth.KUID + Limits map[string]limits.Limit + ResolveBinaryPath bool + ResolveHome bool + SecretEnvv []string + User string + WorkingDirectory string + func (sca StartContainerArgs) String() string + type State struct + Kernel *kernel.Kernel + Watchdog *watchdog.Watchdog + func (s *State) Save(o *SaveOpts, _ *struct{}) error + type TraceProfileOpts struct + Duration time.Duration + type Usage struct + Kernel *kernel.Kernel + func (*Usage) GetFileIoStats(_ *struct{}, out *string) error + func (u *Usage) Collect(opts *MemoryUsageOpts, out *MemoryUsage) error + func (u *Usage) Reduce(opts *UsageReduceOpts, out *UsageReduceOutput) error + func (u *Usage) UsageFD(opts *MemoryUsageFileOpts, out *MemoryUsageFile) error + type UsageReduceOpts struct + DoNotGC bool + Wait bool + type UsageReduceOutput struct