cri

package
v0.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCriType

func GetCriType() string

GetCriType 获取 CRI 类型

func GetPids

func GetPids(containerID string) ([]int, error)

GetPid 根据 CRI 类型获取容器的 PID

Types

type Containerd

type Containerd struct {
	ID string
}

func (Containerd) GetPids

func (m Containerd) GetPids() ([]int, error)

type Docker

type Docker struct {
	ID string
}

func (Docker) GetPids

func (m Docker) GetPids() ([]int, error)

type Handler

type Handler interface {
	GetPids() ([]int, error)
}

func NewContainerd

func NewContainerd(id string) Handler

func NewCriHandler

func NewCriHandler(criType string, containerID string) (Handler, error)

NewCriHandler 根据 CRI 类型创建相应的 Handler

func NewDocker

func NewDocker(id string) Handler

Jump to

Keyboard shortcuts

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