cri

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRIClient

type CRIClient struct {
	Name        types.RuntimeName
	SocketPath  string
	ConnTimeout time.Duration
	// contains filtered or unexported fields
}

CRIClient implements the ContainerRuntimeClient interface using the CRI plugin interface to communicate with the different container runtimes.

func NewCRIClient

func NewCRIClient(name types.RuntimeName, socketPath string, timeout time.Duration) (*CRIClient, error)

func (*CRIClient) Close

func (c *CRIClient) Close() error

func (*CRIClient) GetContainer

func (c *CRIClient) GetContainer(containerID string) (*runtimeclient.ContainerData, error)

func (*CRIClient) GetContainerDetails

func (c *CRIClient) GetContainerDetails(containerID string) (*runtimeclient.ContainerDetailsData, error)

func (*CRIClient) GetContainers

func (c *CRIClient) GetContainers() ([]*runtimeclient.ContainerData, error)

func (*CRIClient) GetPodLabels added in v0.26.0

func (c *CRIClient) GetPodLabels(sandboxId string) (map[string]string, error)

type CRIContainer added in v0.19.0

type CRIContainer interface {
	GetId() string
	GetState() runtime.ContainerState
	GetMetadata() *runtime.ContainerMetadata
	GetLabels() map[string]string
	GetImage() *runtime.ImageSpec
	GetImageRef() string
}

CRIContainer is an interface that contains the methods required to get the information of a container from the responses of the CRI. In particular, from runtime.ContainerStatus and runtime.Container.

Jump to

Keyboard shortcuts

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