criproxy

package
v1.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ListImages  = "ListImages"
	ImageStatus = "ImageStatus"
	PullImage   = "PullImage"
	RemoveImage = "RemoveImage"
	ImageFsInfo = "ImageFsInfo"
)
View Source
const (
	Version                  = "Version"
	RunPodSandbox            = "RunPodSandbox"
	StopPodSandbox           = "StopPodSandbox"
	RemovePodSandbox         = "RemovePodSandbox"
	PodSandboxStatus         = "PodSandboxStatus"
	ListPodSandbox           = "ListPodSandbox"
	CreateContainer          = "CreateContainer"
	StartContainer           = "StartContainer"
	StopContainer            = "StopContainer"
	RemoveContainer          = "RemoveContainer"
	ListContainers           = "ListContainers"
	ContainerStatus          = "ContainerStatus"
	UpdateContainerResources = "UpdateContainerResources"
	ReopenContainerLog       = "ReopenContainerLog"
	ExecSync                 = "ExecSync"
	Exec                     = "Exec"
	Attach                   = "Attach"
	PortForward              = "PortForward"
	ContainerStats           = "ContainerStats"
	ListContainerStats       = "ListContainerStats"
	PodSandboxStats          = "PodSandboxStats"
	ListPodSandboxStats      = "ListPodSandboxStats"
	UpdateRuntimeConfig      = "UpdateRuntimeConfig"
	Status                   = "Status"
	CheckpointContainer      = "CheckpointContainer"
	GetContainerEvents       = "GetContainerEvents"
	ListMetricDescriptors    = "ListMetricDescriptors"
	ListPodSandboxMetrics    = "ListPodSandboxMetrics"
	RuntimeConfig            = "RuntimeConfig"
)

Variables

This section is empty.

Functions

func GenerateEndpoint

func GenerateEndpoint() (string, error)

GenerateEndpoint generates a new unix socket server of grpc server.

Types

type RemoteRuntime

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

RemoteRuntime represents a proxy for remote container runtime.

func NewRemoteRuntimeProxy

func NewRemoteRuntimeProxy(runtimeService internalapi.RuntimeService, imageService internalapi.ImageManagerService) *RemoteRuntime

NewRemoteRuntimeProxy creates a new RemoteRuntime.

func (*RemoteRuntime) AddInjector

func (p *RemoteRuntime) AddInjector(injector func(string) error)

AddInjector inject the error or delay to the next call to the RuntimeService.

func (*RemoteRuntime) Attach

Attach prepares a streaming endpoint to attach to a running container.

func (*RemoteRuntime) CheckpointContainer

CheckpointContainer checkpoints the given container.

func (*RemoteRuntime) ContainerStats

ContainerStats returns stats of the container. If the container does not exist, the call returns an error.

func (*RemoteRuntime) ContainerStatus

ContainerStatus returns status of the container. If the container is not present, returns an error.

func (*RemoteRuntime) CreateContainer

CreateContainer creates a new container in specified PodSandbox

func (*RemoteRuntime) Exec

Exec prepares a streaming endpoint to execute a command in the container.

func (*RemoteRuntime) ExecSync

ExecSync runs a command in a container synchronously.

func (*RemoteRuntime) ImageFsInfo

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

func (*RemoteRuntime) ImageStatus

ImageStatus returns the status of the image. If the image is not present, returns a response with ImageStatusResponse.Image set to nil.

func (*RemoteRuntime) ListContainerStats

ListContainerStats returns stats of all running containers.

func (*RemoteRuntime) ListContainers

ListContainers lists all containers by filters.

func (*RemoteRuntime) ListImages

ListImages lists existing images.

func (*RemoteRuntime) ListMetricDescriptors

ListMetricDescriptors gets the descriptors for the metrics that will be returned in ListPodSandboxMetrics.

func (*RemoteRuntime) ListPodSandbox

ListPodSandbox returns a list of PodSandboxes.

func (*RemoteRuntime) ListPodSandboxMetrics

ListPodSandboxMetrics retrieves the metrics for all pod sandboxes.

func (*RemoteRuntime) ListPodSandboxStats

ListPodSandboxStats returns stats of all running pods.

func (*RemoteRuntime) PodSandboxStats

PodSandboxStats returns stats of the pod. If the pod does not exist, the call returns an error.

func (*RemoteRuntime) PodSandboxStatus

PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not present, returns an error.

func (*RemoteRuntime) PortForward

PortForward prepares a streaming endpoint to forward ports from a PodSandbox.

func (*RemoteRuntime) PullImage

PullImage pulls an image with authentication config.

func (*RemoteRuntime) RemoveContainer

RemoveContainer removes the container. If the container is running, the container must be forcibly removed. This call is idempotent, and must not return an error if the container has already been removed.

func (*RemoteRuntime) RemoveImage

RemoveImage removes the image. This call is idempotent, and must not return an error if the image has already been removed.

func (*RemoteRuntime) RemovePodSandbox

RemovePodSandbox removes the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated and removed. This call is idempotent, and must not return an error if the sandbox has already been removed.

func (*RemoteRuntime) ReopenContainerLog

ReopenContainerLog reopens the container log file.

func (*RemoteRuntime) ResetInjectors

func (p *RemoteRuntime) ResetInjectors()

ResetInjectors resets all registered injectors.

func (*RemoteRuntime) RunPodSandbox

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

func (*RemoteRuntime) RuntimeConfig

RuntimeConfig returns the configuration information of the runtime.

func (*RemoteRuntime) Start

func (p *RemoteRuntime) Start(endpoint string) error

Start starts the remote runtime proxy.

func (*RemoteRuntime) StartContainer

StartContainer starts the container.

func (*RemoteRuntime) Status

Status returns the status of the runtime.

func (*RemoteRuntime) Stop

func (p *RemoteRuntime) Stop()

Stop stops the fake remote runtime proxy.

func (*RemoteRuntime) StopContainer

StopContainer stops a running container with a grace period (i.e., timeout). This call is idempotent, and must not return an error if the container has already been stopped.

func (*RemoteRuntime) StopPodSandbox

StopPodSandbox stops any running process that is part of the sandbox and reclaims network resources (e.g., IP addresses) allocated to the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated.

func (*RemoteRuntime) UpdateContainerResources

UpdateContainerResources updates ContainerConfig of the container.

func (*RemoteRuntime) UpdateRuntimeConfig

UpdateRuntimeConfig updates the runtime configuration based on the given request.

func (*RemoteRuntime) Version

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

Jump to

Keyboard shortcuts

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