cri

package
v0.0.0-...-987032a Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerRuntimeInterfaceDocker = "docker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerRuntimeInterfaceClient

type ContainerRuntimeInterfaceClient interface {
	GetPidFromContainer(ctx context.Context, containerId string) (uint32, error)
}

ContainerRuntimeInterfaceClient contains functions for container info

func NewContainerRuntimeInterfaceClient

func NewContainerRuntimeInterfaceClient(cri string) (ContainerRuntimeInterfaceClient, error)

NewContainerRuntimeInterfaceClient return a new ContainerRuntimeInterfaceClient based different CRI

type DockerClient

type DockerClient struct {
	Client DockerOperations
}

func NewDockerClient

func NewDockerClient(host, version string, http *http.Client, headers map[string]string) (*DockerClient, error)

func (DockerClient) GetPidFromContainer

func (c DockerClient) GetPidFromContainer(ctx context.Context, containerId string) (uint32, error)

GetPidFromContainer will get Pid from containerId

type DockerOperations

type DockerOperations interface {
	ContainerInspect(ctx context.Context, containerId string) (dockertypes.ContainerJSON, error)
}

Jump to

Keyboard shortcuts

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