container

package
v1.0.0-pre2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The mountpoint inside the operator's container of the node's
	// procfs
	ProcMountpoint = "/host/proc"
	// If the node is a container (for example, this happens with
	// clusters created with Kind), the actual host's procfs is assumed
	// to be mounted here
	RealHostProcMountpoint = "/host/real/proc"
)
View Source
const (
	MINORBITS = 20
	MINORMASK = (1 << MINORBITS) - 1
)

Variables

View Source
var (
	ContainerRuntimes map[string]Runtime = make(map[string]Runtime)
)

Functions

func CloseConnections

func CloseConnections() error

func IsContainerRuntimeSupported

func IsContainerRuntimeSupported(runtime string) bool

func SplitContainerRuntimeID

func SplitContainerRuntimeID(input ContainerName) (ContainerName, ContainerID, error)

func UserDevToKernelDev

func UserDevToKernelDev(userdev uint64) uint32

Types

type ContainerData

type ContainerData struct {
	Ino   Ino
	DevID Dev
	ID    string
	Name  ContainerName
	// If true, ContainerData should be requested again later
	ShouldRequeue bool
	// False if an inode was not found, used for improved error messages
	IsFound bool
}

func GetContainerData

func GetContainerData(ctx context.Context, containerStatus corev1.ContainerStatus, kiveTrap kivev2alpha1.KiveTrap) (ContainerData, error)

type ContainerID

type ContainerID = string

type ContainerName

type ContainerName = string

type Containerd

type Containerd struct {
	Client *containerd.Client
	// contains filtered or unexported fields
}

func (*Containerd) Connect

func (self *Containerd) Connect(ctx context.Context) error

func (*Containerd) Disconnect

func (self *Containerd) Disconnect() error

func (*Containerd) GetContainerData

func (self *Containerd) GetContainerData(ctx context.Context, id string, kiveTrap kivev2alpha1.KiveTrap) (ContainerData, error)

func (*Containerd) IsConnected

func (self *Containerd) IsConnected() bool

type Dev

type Dev = uint32

type Ino

type Ino = uint64

type Pid

type Pid = uint32

type Runtime

type Runtime interface {
	IsConnected() bool
	Connect(ctx context.Context) error
	Disconnect() error
	GetContainerData(ctx context.Context, id ContainerID, kiveTrap kivev2alpha1.KiveTrap) (ContainerData, error)
}

Jump to

Keyboard shortcuts

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