container

package
v0.9.0-beta.45 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: AGPL-3.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KillContainerSignalEnvName = "KILL_CONTAINER_SIGNAL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CRIType

type CRIType string
const (
	DockerType     CRIType = "docker"
	ContainerdType CRIType = "containerd"
	AutoType       CRIType = "auto"
)

type ContainerKiller

type ContainerKiller interface {

	// Kill containers in the pod by cri
	// e.g. docker or containerd
	Kill(ctx context.Context, containerIDs []string, signal string, timeout *time.Duration) error

	// Init cri killer init interface
	Init(ctx context.Context) error
}

ContainerKiller kills container interface

func NewContainerKiller

func NewContainerKiller(containerRuntime CRIType, runtimeEndpoint string, logger *zap.SugaredLogger) (ContainerKiller, error)

type TargetContainer

type TargetContainer struct {
	Name          string // Name is pod name
	Namespace     string // Namespace is pod namespace
	ContainerName string // ContainerName is container name
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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