package remote

import "github.com/containerd/containerd/integration/remote"

Package remote contains gRPC implementation of internalapi.RuntimeService and internalapi.ImageManagerService.

Index

Functions

func NewImageService

func NewImageService(endpoint string, connectionTimeout time.Duration) (internalapi.ImageManagerService, error)

NewImageService creates a new internalapi.ImageManagerService.

func NewRuntimeService

func NewRuntimeService(endpoint string, connectionTimeout time.Duration) (internalapi.RuntimeService, error)

NewRuntimeService creates a new internalapi.RuntimeService.

Types

type ImageService

type ImageService struct {
	// contains filtered or unexported fields
}

ImageService is a gRPC implementation of internalapi.ImageManagerService.

func (*ImageService) ImageFsInfo

func (r *ImageService) ImageFsInfo(opts ...grpc.CallOption) ([]*runtimeapi.FilesystemUsage, error)

ImageFsInfo returns information of the filesystem that is used to store images.

func (*ImageService) ImageStatus

func (r *ImageService) ImageStatus(image *runtimeapi.ImageSpec, opts ...grpc.CallOption) (*runtimeapi.Image, error)

ImageStatus returns the status of the image.

func (*ImageService) ListImages

func (r *ImageService) ListImages(filter *runtimeapi.ImageFilter, opts ...grpc.CallOption) ([]*runtimeapi.Image, error)

ListImages lists available images.

func (*ImageService) PullImage

func (r *ImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig, opts ...grpc.CallOption) (string, error)

PullImage pulls an image with authentication config.

func (*ImageService) RemoveImage

func (r *ImageService) RemoveImage(image *runtimeapi.ImageSpec, opts ...grpc.CallOption) error

RemoveImage removes the image.

type RuntimeService

type RuntimeService struct {
	// contains filtered or unexported fields
}

RuntimeService is a gRPC implementation of internalapi.RuntimeService.

func (*RuntimeService) Attach

Attach prepares a streaming endpoint to attach to a running container, and returns the address.

func (*RuntimeService) ContainerStats

func (r *RuntimeService) ContainerStats(containerID string, opts ...grpc.CallOption) (*runtimeapi.ContainerStats, error)

ContainerStats returns the stats of the container.

func (*RuntimeService) ContainerStatus

func (r *RuntimeService) ContainerStatus(containerID string, opts ...grpc.CallOption) (*runtimeapi.ContainerStatus, error)

ContainerStatus returns the container status.

func (*RuntimeService) CreateContainer

func (r *RuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, sandboxConfig *runtimeapi.PodSandboxConfig, opts ...grpc.CallOption) (string, error)

CreateContainer creates a new container in the specified PodSandbox.

func (*RuntimeService) Exec

Exec prepares a streaming endpoint to execute a command in the container, and returns the address.

func (*RuntimeService) ExecSync

func (r *RuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration, opts ...grpc.CallOption) (stdout []byte, stderr []byte, err error)

ExecSync executes a command in the container, and returns the stdout output. If command exits with a non-zero exit code, an error is returned.

func (*RuntimeService) GetContainerEvents

GetContainerEvents returns a GRPC client to stream container events

func (*RuntimeService) ListContainerStats

func (r *RuntimeService) ListContainerStats(filter *runtimeapi.ContainerStatsFilter, opts ...grpc.CallOption) ([]*runtimeapi.ContainerStats, error)

ListContainerStats lists all container stats given the provided filter

func (*RuntimeService) ListContainers

func (r *RuntimeService) ListContainers(filter *runtimeapi.ContainerFilter, opts ...grpc.CallOption) ([]*runtimeapi.Container, error)

ListContainers lists containers by filters.

func (*RuntimeService) ListPodSandbox

func (r *RuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter, opts ...grpc.CallOption) ([]*runtimeapi.PodSandbox, error)

ListPodSandbox returns a list of PodSandboxes.

func (*RuntimeService) PodSandboxStatus

func (r *RuntimeService) PodSandboxStatus(podSandBoxID string, opts ...grpc.CallOption) (*runtimeapi.PodSandboxStatus, error)

PodSandboxStatus returns the status of the PodSandbox.

func (*RuntimeService) PortForward

PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.

func (*RuntimeService) RemoveContainer

func (r *RuntimeService) RemoveContainer(containerID string, opts ...grpc.CallOption) error

RemoveContainer removes the container. If the container is running, the container should be forced to removal.

func (*RuntimeService) RemovePodSandbox

func (r *RuntimeService) RemovePodSandbox(podSandBoxID string, opts ...grpc.CallOption) error

RemovePodSandbox removes the sandbox. If there are any containers in the sandbox, they should be forcibly removed.

func (*RuntimeService) ReopenContainerLog

func (r *RuntimeService) ReopenContainerLog(containerID string, opts ...grpc.CallOption) error

ReopenContainerLog reopens the container log for the given container ID

func (*RuntimeService) RunPodSandbox

func (r *RuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string, opts ...grpc.CallOption) (string, error)

RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure the sandbox is in ready state.

func (*RuntimeService) StartContainer

func (r *RuntimeService) StartContainer(containerID string, opts ...grpc.CallOption) error

StartContainer starts the container.

func (*RuntimeService) Status

Status returns the status of the runtime.

func (*RuntimeService) StopContainer

func (r *RuntimeService) StopContainer(containerID string, timeout int64, opts ...grpc.CallOption) error

StopContainer stops a running container with a grace period (i.e., timeout).

func (*RuntimeService) StopPodSandbox

func (r *RuntimeService) StopPodSandbox(podSandBoxID string, opts ...grpc.CallOption) error

StopPodSandbox stops the sandbox. If there are any running containers in the sandbox, they should be forced to termination.

func (*RuntimeService) UpdateContainerResources

func (r *RuntimeService) UpdateContainerResources(containerID string, resources *runtimeapi.LinuxContainerResources, windowsResources *runtimeapi.WindowsContainerResources, opts ...grpc.CallOption) error

UpdateContainerResources updates a containers resource config

func (*RuntimeService) UpdateRuntimeConfig

func (r *RuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig, opts ...grpc.CallOption) error

UpdateRuntimeConfig updates the config of a runtime service. The only update payload currently supported is the pod CIDR assigned to a node, and the runtime service just proxies it down to the network plugin.

func (*RuntimeService) Version

func (r *RuntimeService) Version(apiVersion string, opts ...grpc.CallOption) (*runtimeapi.VersionResponse, error)

Version returns the runtime name, runtime version and runtime API version.

Source Files

doc.go remote_image.go remote_runtime.go utils.go

Directories

PathSynopsis
integration/remote/util
Version
v1.7.16
Published
Apr 25, 2024
Platform
js/wasm
Imports
13 packages
Last checked
52 seconds ago

Tools for package owners.