runtimev1connect

package
v1.16.1-20231226185118... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RuntimeServiceName is the fully-qualified name of the RuntimeService service.
	RuntimeServiceName = "runtime.v1.RuntimeService"
	// ImageServiceName is the fully-qualified name of the ImageService service.
	ImageServiceName = "runtime.v1.ImageService"
)
View Source
const (
	// RuntimeServiceVersionProcedure is the fully-qualified name of the RuntimeService's Version RPC.
	RuntimeServiceVersionProcedure = "/runtime.v1.RuntimeService/Version"
	// RuntimeServiceRunPodSandboxProcedure is the fully-qualified name of the RuntimeService's
	// RunPodSandbox RPC.
	RuntimeServiceRunPodSandboxProcedure = "/runtime.v1.RuntimeService/RunPodSandbox"
	// RuntimeServiceStopPodSandboxProcedure is the fully-qualified name of the RuntimeService's
	// StopPodSandbox RPC.
	RuntimeServiceStopPodSandboxProcedure = "/runtime.v1.RuntimeService/StopPodSandbox"
	// RuntimeServiceRemovePodSandboxProcedure is the fully-qualified name of the RuntimeService's
	// RemovePodSandbox RPC.
	RuntimeServiceRemovePodSandboxProcedure = "/runtime.v1.RuntimeService/RemovePodSandbox"
	// RuntimeServicePodSandboxStatusProcedure is the fully-qualified name of the RuntimeService's
	// PodSandboxStatus RPC.
	RuntimeServicePodSandboxStatusProcedure = "/runtime.v1.RuntimeService/PodSandboxStatus"
	// RuntimeServiceListPodSandboxProcedure is the fully-qualified name of the RuntimeService's
	// ListPodSandbox RPC.
	RuntimeServiceListPodSandboxProcedure = "/runtime.v1.RuntimeService/ListPodSandbox"
	// RuntimeServiceCreateContainerProcedure is the fully-qualified name of the RuntimeService's
	// CreateContainer RPC.
	RuntimeServiceCreateContainerProcedure = "/runtime.v1.RuntimeService/CreateContainer"
	// RuntimeServiceStartContainerProcedure is the fully-qualified name of the RuntimeService's
	// StartContainer RPC.
	RuntimeServiceStartContainerProcedure = "/runtime.v1.RuntimeService/StartContainer"
	// RuntimeServiceStopContainerProcedure is the fully-qualified name of the RuntimeService's
	// StopContainer RPC.
	RuntimeServiceStopContainerProcedure = "/runtime.v1.RuntimeService/StopContainer"
	// RuntimeServiceRemoveContainerProcedure is the fully-qualified name of the RuntimeService's
	// RemoveContainer RPC.
	RuntimeServiceRemoveContainerProcedure = "/runtime.v1.RuntimeService/RemoveContainer"
	// RuntimeServiceListContainersProcedure is the fully-qualified name of the RuntimeService's
	// ListContainers RPC.
	RuntimeServiceListContainersProcedure = "/runtime.v1.RuntimeService/ListContainers"
	// RuntimeServiceContainerStatusProcedure is the fully-qualified name of the RuntimeService's
	// ContainerStatus RPC.
	RuntimeServiceContainerStatusProcedure = "/runtime.v1.RuntimeService/ContainerStatus"
	// RuntimeServiceUpdateContainerResourcesProcedure is the fully-qualified name of the
	// RuntimeService's UpdateContainerResources RPC.
	RuntimeServiceUpdateContainerResourcesProcedure = "/runtime.v1.RuntimeService/UpdateContainerResources"
	// RuntimeServiceReopenContainerLogProcedure is the fully-qualified name of the RuntimeService's
	// ReopenContainerLog RPC.
	RuntimeServiceReopenContainerLogProcedure = "/runtime.v1.RuntimeService/ReopenContainerLog"
	// RuntimeServiceExecSyncProcedure is the fully-qualified name of the RuntimeService's ExecSync RPC.
	RuntimeServiceExecSyncProcedure = "/runtime.v1.RuntimeService/ExecSync"
	// RuntimeServiceExecProcedure is the fully-qualified name of the RuntimeService's Exec RPC.
	RuntimeServiceExecProcedure = "/runtime.v1.RuntimeService/Exec"
	// RuntimeServiceAttachProcedure is the fully-qualified name of the RuntimeService's Attach RPC.
	RuntimeServiceAttachProcedure = "/runtime.v1.RuntimeService/Attach"
	// RuntimeServicePortForwardProcedure is the fully-qualified name of the RuntimeService's
	// PortForward RPC.
	RuntimeServicePortForwardProcedure = "/runtime.v1.RuntimeService/PortForward"
	// RuntimeServiceContainerStatsProcedure is the fully-qualified name of the RuntimeService's
	// ContainerStats RPC.
	RuntimeServiceContainerStatsProcedure = "/runtime.v1.RuntimeService/ContainerStats"
	// RuntimeServiceListContainerStatsProcedure is the fully-qualified name of the RuntimeService's
	// ListContainerStats RPC.
	RuntimeServiceListContainerStatsProcedure = "/runtime.v1.RuntimeService/ListContainerStats"
	// RuntimeServicePodSandboxStatsProcedure is the fully-qualified name of the RuntimeService's
	// PodSandboxStats RPC.
	RuntimeServicePodSandboxStatsProcedure = "/runtime.v1.RuntimeService/PodSandboxStats"
	// RuntimeServiceListPodSandboxStatsProcedure is the fully-qualified name of the RuntimeService's
	// ListPodSandboxStats RPC.
	RuntimeServiceListPodSandboxStatsProcedure = "/runtime.v1.RuntimeService/ListPodSandboxStats"
	// RuntimeServiceUpdateRuntimeConfigProcedure is the fully-qualified name of the RuntimeService's
	// UpdateRuntimeConfig RPC.
	RuntimeServiceUpdateRuntimeConfigProcedure = "/runtime.v1.RuntimeService/UpdateRuntimeConfig"
	// RuntimeServiceStatusProcedure is the fully-qualified name of the RuntimeService's Status RPC.
	RuntimeServiceStatusProcedure = "/runtime.v1.RuntimeService/Status"
	// RuntimeServiceCheckpointContainerProcedure is the fully-qualified name of the RuntimeService's
	// CheckpointContainer RPC.
	RuntimeServiceCheckpointContainerProcedure = "/runtime.v1.RuntimeService/CheckpointContainer"
	// RuntimeServiceGetContainerEventsProcedure is the fully-qualified name of the RuntimeService's
	// GetContainerEvents RPC.
	RuntimeServiceGetContainerEventsProcedure = "/runtime.v1.RuntimeService/GetContainerEvents"
	// RuntimeServiceListMetricDescriptorsProcedure is the fully-qualified name of the RuntimeService's
	// ListMetricDescriptors RPC.
	RuntimeServiceListMetricDescriptorsProcedure = "/runtime.v1.RuntimeService/ListMetricDescriptors"
	// RuntimeServiceListPodSandboxMetricsProcedure is the fully-qualified name of the RuntimeService's
	// ListPodSandboxMetrics RPC.
	RuntimeServiceListPodSandboxMetricsProcedure = "/runtime.v1.RuntimeService/ListPodSandboxMetrics"
	// RuntimeServiceRuntimeConfigProcedure is the fully-qualified name of the RuntimeService's
	// RuntimeConfig RPC.
	RuntimeServiceRuntimeConfigProcedure = "/runtime.v1.RuntimeService/RuntimeConfig"
	// ImageServiceListImagesProcedure is the fully-qualified name of the ImageService's ListImages RPC.
	ImageServiceListImagesProcedure = "/runtime.v1.ImageService/ListImages"
	// ImageServiceImageStatusProcedure is the fully-qualified name of the ImageService's ImageStatus
	// RPC.
	ImageServiceImageStatusProcedure = "/runtime.v1.ImageService/ImageStatus"
	// ImageServicePullImageProcedure is the fully-qualified name of the ImageService's PullImage RPC.
	ImageServicePullImageProcedure = "/runtime.v1.ImageService/PullImage"
	// ImageServiceRemoveImageProcedure is the fully-qualified name of the ImageService's RemoveImage
	// RPC.
	ImageServiceRemoveImageProcedure = "/runtime.v1.ImageService/RemoveImage"
	// ImageServiceImageFsInfoProcedure is the fully-qualified name of the ImageService's ImageFsInfo
	// RPC.
	ImageServiceImageFsInfoProcedure = "/runtime.v1.ImageService/ImageFsInfo"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

This section is empty.

Functions

func NewImageServiceHandler

func NewImageServiceHandler(svc ImageServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewImageServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewRuntimeServiceHandler

func NewRuntimeServiceHandler(svc RuntimeServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewRuntimeServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type ImageServiceClient

type ImageServiceClient interface {
	// ListImages lists existing images.
	ListImages(context.Context, *connect.Request[v1.ListImagesRequest]) (*connect.Response[v1.ListImagesResponse], error)
	// ImageStatus returns the status of the image. If the image is not
	// present, returns a response with ImageStatusResponse.Image set to
	// nil.
	ImageStatus(context.Context, *connect.Request[v1.ImageStatusRequest]) (*connect.Response[v1.ImageStatusResponse], error)
	// PullImage pulls an image with authentication config.
	PullImage(context.Context, *connect.Request[v1.PullImageRequest]) (*connect.Response[v1.PullImageResponse], error)
	// RemoveImage removes the image.
	// This call is idempotent, and must not return an error if the image has
	// already been removed.
	RemoveImage(context.Context, *connect.Request[v1.RemoveImageRequest]) (*connect.Response[v1.RemoveImageResponse], error)
	// ImageFSInfo returns information of the filesystem that is used to store images.
	ImageFsInfo(context.Context, *connect.Request[v1.ImageFsInfoRequest]) (*connect.Response[v1.ImageFsInfoResponse], error)
}

ImageServiceClient is a client for the runtime.v1.ImageService service.

func NewImageServiceClient

func NewImageServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ImageServiceClient

NewImageServiceClient constructs a client for the runtime.v1.ImageService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ImageServiceHandler

type ImageServiceHandler interface {
	// ListImages lists existing images.
	ListImages(context.Context, *connect.Request[v1.ListImagesRequest]) (*connect.Response[v1.ListImagesResponse], error)
	// ImageStatus returns the status of the image. If the image is not
	// present, returns a response with ImageStatusResponse.Image set to
	// nil.
	ImageStatus(context.Context, *connect.Request[v1.ImageStatusRequest]) (*connect.Response[v1.ImageStatusResponse], error)
	// PullImage pulls an image with authentication config.
	PullImage(context.Context, *connect.Request[v1.PullImageRequest]) (*connect.Response[v1.PullImageResponse], error)
	// RemoveImage removes the image.
	// This call is idempotent, and must not return an error if the image has
	// already been removed.
	RemoveImage(context.Context, *connect.Request[v1.RemoveImageRequest]) (*connect.Response[v1.RemoveImageResponse], error)
	// ImageFSInfo returns information of the filesystem that is used to store images.
	ImageFsInfo(context.Context, *connect.Request[v1.ImageFsInfoRequest]) (*connect.Response[v1.ImageFsInfoResponse], error)
}

ImageServiceHandler is an implementation of the runtime.v1.ImageService service.

type RuntimeServiceClient

type RuntimeServiceClient interface {
	// Version returns the runtime name, runtime version, and runtime API version.
	Version(context.Context, *connect.Request[v1.VersionRequest]) (*connect.Response[v1.VersionResponse], error)
	// RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
	// the sandbox is in the ready state on success.
	RunPodSandbox(context.Context, *connect.Request[v1.RunPodSandboxRequest]) (*connect.Response[v1.RunPodSandboxResponse], error)
	// 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.
	// This call is idempotent, and must not return an error if all relevant
	// resources have already been reclaimed. kubelet will call StopPodSandbox
	// at least once before calling RemovePodSandbox. It will also attempt to
	// reclaim resources eagerly, as soon as a sandbox is not needed. Hence,
	// multiple StopPodSandbox calls are expected.
	StopPodSandbox(context.Context, *connect.Request[v1.StopPodSandboxRequest]) (*connect.Response[v1.StopPodSandboxResponse], error)
	// 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.
	RemovePodSandbox(context.Context, *connect.Request[v1.RemovePodSandboxRequest]) (*connect.Response[v1.RemovePodSandboxResponse], error)
	// PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not
	// present, returns an error.
	PodSandboxStatus(context.Context, *connect.Request[v1.PodSandboxStatusRequest]) (*connect.Response[v1.PodSandboxStatusResponse], error)
	// ListPodSandbox returns a list of PodSandboxes.
	ListPodSandbox(context.Context, *connect.Request[v1.ListPodSandboxRequest]) (*connect.Response[v1.ListPodSandboxResponse], error)
	// CreateContainer creates a new container in specified PodSandbox
	CreateContainer(context.Context, *connect.Request[v1.CreateContainerRequest]) (*connect.Response[v1.CreateContainerResponse], error)
	// StartContainer starts the container.
	StartContainer(context.Context, *connect.Request[v1.StartContainerRequest]) (*connect.Response[v1.StartContainerResponse], error)
	// 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.
	// The runtime must forcibly kill the container after the grace period is
	// reached.
	StopContainer(context.Context, *connect.Request[v1.StopContainerRequest]) (*connect.Response[v1.StopContainerResponse], error)
	// 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.
	RemoveContainer(context.Context, *connect.Request[v1.RemoveContainerRequest]) (*connect.Response[v1.RemoveContainerResponse], error)
	// ListContainers lists all containers by filters.
	ListContainers(context.Context, *connect.Request[v1.ListContainersRequest]) (*connect.Response[v1.ListContainersResponse], error)
	// ContainerStatus returns status of the container. If the container is not
	// present, returns an error.
	ContainerStatus(context.Context, *connect.Request[v1.ContainerStatusRequest]) (*connect.Response[v1.ContainerStatusResponse], error)
	// UpdateContainerResources updates ContainerConfig of the container synchronously.
	// If runtime fails to transactionally update the requested resources, an error is returned.
	UpdateContainerResources(context.Context, *connect.Request[v1.UpdateContainerResourcesRequest]) (*connect.Response[v1.UpdateContainerResourcesResponse], error)
	// ReopenContainerLog asks runtime to reopen the stdout/stderr log file
	// for the container. This is often called after the log file has been
	// rotated. If the container is not running, container runtime can choose
	// to either create a new log file and return nil, or return an error.
	// Once it returns error, new container log file MUST NOT be created.
	ReopenContainerLog(context.Context, *connect.Request[v1.ReopenContainerLogRequest]) (*connect.Response[v1.ReopenContainerLogResponse], error)
	// ExecSync runs a command in a container synchronously.
	ExecSync(context.Context, *connect.Request[v1.ExecSyncRequest]) (*connect.Response[v1.ExecSyncResponse], error)
	// Exec prepares a streaming endpoint to execute a command in the container.
	Exec(context.Context, *connect.Request[v1.ExecRequest]) (*connect.Response[v1.ExecResponse], error)
	// Attach prepares a streaming endpoint to attach to a running container.
	Attach(context.Context, *connect.Request[v1.AttachRequest]) (*connect.Response[v1.AttachResponse], error)
	// PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
	PortForward(context.Context, *connect.Request[v1.PortForwardRequest]) (*connect.Response[v1.PortForwardResponse], error)
	// ContainerStats returns stats of the container. If the container does not
	// exist, the call returns an error.
	ContainerStats(context.Context, *connect.Request[v1.ContainerStatsRequest]) (*connect.Response[v1.ContainerStatsResponse], error)
	// ListContainerStats returns stats of all running containers.
	ListContainerStats(context.Context, *connect.Request[v1.ListContainerStatsRequest]) (*connect.Response[v1.ListContainerStatsResponse], error)
	// PodSandboxStats returns stats of the pod sandbox. If the pod sandbox does not
	// exist, the call returns an error.
	PodSandboxStats(context.Context, *connect.Request[v1.PodSandboxStatsRequest]) (*connect.Response[v1.PodSandboxStatsResponse], error)
	// ListPodSandboxStats returns stats of the pod sandboxes matching a filter.
	ListPodSandboxStats(context.Context, *connect.Request[v1.ListPodSandboxStatsRequest]) (*connect.Response[v1.ListPodSandboxStatsResponse], error)
	// UpdateRuntimeConfig updates the runtime configuration based on the given request.
	UpdateRuntimeConfig(context.Context, *connect.Request[v1.UpdateRuntimeConfigRequest]) (*connect.Response[v1.UpdateRuntimeConfigResponse], error)
	// Status returns the status of the runtime.
	Status(context.Context, *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error)
	// CheckpointContainer checkpoints a container
	CheckpointContainer(context.Context, *connect.Request[v1.CheckpointContainerRequest]) (*connect.Response[v1.CheckpointContainerResponse], error)
	// GetContainerEvents gets container events from the CRI runtime
	GetContainerEvents(context.Context, *connect.Request[v1.GetEventsRequest]) (*connect.ServerStreamForClient[v1.ContainerEventResponse], error)
	// ListMetricDescriptors gets the descriptors for the metrics that will be returned in ListPodSandboxMetrics.
	// This list should be static at startup: either the client and server restart together when
	// adding or removing metrics descriptors, or they should not change.
	// Put differently, if ListPodSandboxMetrics references a name that is not described in the initial
	// ListMetricDescriptors call, then the metric will not be broadcasted.
	ListMetricDescriptors(context.Context, *connect.Request[v1.ListMetricDescriptorsRequest]) (*connect.Response[v1.ListMetricDescriptorsResponse], error)
	// ListPodSandboxMetrics gets pod sandbox metrics from CRI Runtime
	ListPodSandboxMetrics(context.Context, *connect.Request[v1.ListPodSandboxMetricsRequest]) (*connect.Response[v1.ListPodSandboxMetricsResponse], error)
	// RuntimeConfig returns configuration information of the runtime.
	// A couple of notes:
	//   - The RuntimeConfigRequest object is not to be confused with the contents of UpdateRuntimeConfigRequest.
	//     The former is for having runtime tell Kubelet what to do, the latter vice versa.
	//   - It is the expectation of the Kubelet that these fields are static for the lifecycle of the Kubelet.
	//     The Kubelet will not re-request the RuntimeConfiguration after startup, and CRI implementations should
	//     avoid updating them without a full node reboot.
	RuntimeConfig(context.Context, *connect.Request[v1.RuntimeConfigRequest]) (*connect.Response[v1.RuntimeConfigResponse], error)
}

RuntimeServiceClient is a client for the runtime.v1.RuntimeService service.

func NewRuntimeServiceClient

func NewRuntimeServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RuntimeServiceClient

NewRuntimeServiceClient constructs a client for the runtime.v1.RuntimeService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type RuntimeServiceHandler

type RuntimeServiceHandler interface {
	// Version returns the runtime name, runtime version, and runtime API version.
	Version(context.Context, *connect.Request[v1.VersionRequest]) (*connect.Response[v1.VersionResponse], error)
	// RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
	// the sandbox is in the ready state on success.
	RunPodSandbox(context.Context, *connect.Request[v1.RunPodSandboxRequest]) (*connect.Response[v1.RunPodSandboxResponse], error)
	// 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.
	// This call is idempotent, and must not return an error if all relevant
	// resources have already been reclaimed. kubelet will call StopPodSandbox
	// at least once before calling RemovePodSandbox. It will also attempt to
	// reclaim resources eagerly, as soon as a sandbox is not needed. Hence,
	// multiple StopPodSandbox calls are expected.
	StopPodSandbox(context.Context, *connect.Request[v1.StopPodSandboxRequest]) (*connect.Response[v1.StopPodSandboxResponse], error)
	// 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.
	RemovePodSandbox(context.Context, *connect.Request[v1.RemovePodSandboxRequest]) (*connect.Response[v1.RemovePodSandboxResponse], error)
	// PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not
	// present, returns an error.
	PodSandboxStatus(context.Context, *connect.Request[v1.PodSandboxStatusRequest]) (*connect.Response[v1.PodSandboxStatusResponse], error)
	// ListPodSandbox returns a list of PodSandboxes.
	ListPodSandbox(context.Context, *connect.Request[v1.ListPodSandboxRequest]) (*connect.Response[v1.ListPodSandboxResponse], error)
	// CreateContainer creates a new container in specified PodSandbox
	CreateContainer(context.Context, *connect.Request[v1.CreateContainerRequest]) (*connect.Response[v1.CreateContainerResponse], error)
	// StartContainer starts the container.
	StartContainer(context.Context, *connect.Request[v1.StartContainerRequest]) (*connect.Response[v1.StartContainerResponse], error)
	// 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.
	// The runtime must forcibly kill the container after the grace period is
	// reached.
	StopContainer(context.Context, *connect.Request[v1.StopContainerRequest]) (*connect.Response[v1.StopContainerResponse], error)
	// 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.
	RemoveContainer(context.Context, *connect.Request[v1.RemoveContainerRequest]) (*connect.Response[v1.RemoveContainerResponse], error)
	// ListContainers lists all containers by filters.
	ListContainers(context.Context, *connect.Request[v1.ListContainersRequest]) (*connect.Response[v1.ListContainersResponse], error)
	// ContainerStatus returns status of the container. If the container is not
	// present, returns an error.
	ContainerStatus(context.Context, *connect.Request[v1.ContainerStatusRequest]) (*connect.Response[v1.ContainerStatusResponse], error)
	// UpdateContainerResources updates ContainerConfig of the container synchronously.
	// If runtime fails to transactionally update the requested resources, an error is returned.
	UpdateContainerResources(context.Context, *connect.Request[v1.UpdateContainerResourcesRequest]) (*connect.Response[v1.UpdateContainerResourcesResponse], error)
	// ReopenContainerLog asks runtime to reopen the stdout/stderr log file
	// for the container. This is often called after the log file has been
	// rotated. If the container is not running, container runtime can choose
	// to either create a new log file and return nil, or return an error.
	// Once it returns error, new container log file MUST NOT be created.
	ReopenContainerLog(context.Context, *connect.Request[v1.ReopenContainerLogRequest]) (*connect.Response[v1.ReopenContainerLogResponse], error)
	// ExecSync runs a command in a container synchronously.
	ExecSync(context.Context, *connect.Request[v1.ExecSyncRequest]) (*connect.Response[v1.ExecSyncResponse], error)
	// Exec prepares a streaming endpoint to execute a command in the container.
	Exec(context.Context, *connect.Request[v1.ExecRequest]) (*connect.Response[v1.ExecResponse], error)
	// Attach prepares a streaming endpoint to attach to a running container.
	Attach(context.Context, *connect.Request[v1.AttachRequest]) (*connect.Response[v1.AttachResponse], error)
	// PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
	PortForward(context.Context, *connect.Request[v1.PortForwardRequest]) (*connect.Response[v1.PortForwardResponse], error)
	// ContainerStats returns stats of the container. If the container does not
	// exist, the call returns an error.
	ContainerStats(context.Context, *connect.Request[v1.ContainerStatsRequest]) (*connect.Response[v1.ContainerStatsResponse], error)
	// ListContainerStats returns stats of all running containers.
	ListContainerStats(context.Context, *connect.Request[v1.ListContainerStatsRequest]) (*connect.Response[v1.ListContainerStatsResponse], error)
	// PodSandboxStats returns stats of the pod sandbox. If the pod sandbox does not
	// exist, the call returns an error.
	PodSandboxStats(context.Context, *connect.Request[v1.PodSandboxStatsRequest]) (*connect.Response[v1.PodSandboxStatsResponse], error)
	// ListPodSandboxStats returns stats of the pod sandboxes matching a filter.
	ListPodSandboxStats(context.Context, *connect.Request[v1.ListPodSandboxStatsRequest]) (*connect.Response[v1.ListPodSandboxStatsResponse], error)
	// UpdateRuntimeConfig updates the runtime configuration based on the given request.
	UpdateRuntimeConfig(context.Context, *connect.Request[v1.UpdateRuntimeConfigRequest]) (*connect.Response[v1.UpdateRuntimeConfigResponse], error)
	// Status returns the status of the runtime.
	Status(context.Context, *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error)
	// CheckpointContainer checkpoints a container
	CheckpointContainer(context.Context, *connect.Request[v1.CheckpointContainerRequest]) (*connect.Response[v1.CheckpointContainerResponse], error)
	// GetContainerEvents gets container events from the CRI runtime
	GetContainerEvents(context.Context, *connect.Request[v1.GetEventsRequest], *connect.ServerStream[v1.ContainerEventResponse]) error
	// ListMetricDescriptors gets the descriptors for the metrics that will be returned in ListPodSandboxMetrics.
	// This list should be static at startup: either the client and server restart together when
	// adding or removing metrics descriptors, or they should not change.
	// Put differently, if ListPodSandboxMetrics references a name that is not described in the initial
	// ListMetricDescriptors call, then the metric will not be broadcasted.
	ListMetricDescriptors(context.Context, *connect.Request[v1.ListMetricDescriptorsRequest]) (*connect.Response[v1.ListMetricDescriptorsResponse], error)
	// ListPodSandboxMetrics gets pod sandbox metrics from CRI Runtime
	ListPodSandboxMetrics(context.Context, *connect.Request[v1.ListPodSandboxMetricsRequest]) (*connect.Response[v1.ListPodSandboxMetricsResponse], error)
	// RuntimeConfig returns configuration information of the runtime.
	// A couple of notes:
	//   - The RuntimeConfigRequest object is not to be confused with the contents of UpdateRuntimeConfigRequest.
	//     The former is for having runtime tell Kubelet what to do, the latter vice versa.
	//   - It is the expectation of the Kubelet that these fields are static for the lifecycle of the Kubelet.
	//     The Kubelet will not re-request the RuntimeConfiguration after startup, and CRI implementations should
	//     avoid updating them without a full node reboot.
	RuntimeConfig(context.Context, *connect.Request[v1.RuntimeConfigRequest]) (*connect.Response[v1.RuntimeConfigResponse], error)
}

RuntimeServiceHandler is an implementation of the runtime.v1.RuntimeService service.

type UnimplementedImageServiceHandler

type UnimplementedImageServiceHandler struct{}

UnimplementedImageServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedImageServiceHandler) ImageFsInfo

func (UnimplementedImageServiceHandler) ImageStatus

func (UnimplementedImageServiceHandler) ListImages

func (UnimplementedImageServiceHandler) PullImage

func (UnimplementedImageServiceHandler) RemoveImage

type UnimplementedRuntimeServiceHandler

type UnimplementedRuntimeServiceHandler struct{}

UnimplementedRuntimeServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedRuntimeServiceHandler) Attach

func (UnimplementedRuntimeServiceHandler) CheckpointContainer

func (UnimplementedRuntimeServiceHandler) ContainerStats

func (UnimplementedRuntimeServiceHandler) ContainerStatus

func (UnimplementedRuntimeServiceHandler) CreateContainer

func (UnimplementedRuntimeServiceHandler) Exec

func (UnimplementedRuntimeServiceHandler) ExecSync

func (UnimplementedRuntimeServiceHandler) GetContainerEvents

func (UnimplementedRuntimeServiceHandler) ListContainerStats

func (UnimplementedRuntimeServiceHandler) ListContainers

func (UnimplementedRuntimeServiceHandler) ListMetricDescriptors

func (UnimplementedRuntimeServiceHandler) ListPodSandbox

func (UnimplementedRuntimeServiceHandler) ListPodSandboxMetrics

func (UnimplementedRuntimeServiceHandler) ListPodSandboxStats

func (UnimplementedRuntimeServiceHandler) PodSandboxStats

func (UnimplementedRuntimeServiceHandler) PodSandboxStatus

func (UnimplementedRuntimeServiceHandler) PortForward

func (UnimplementedRuntimeServiceHandler) RemoveContainer

func (UnimplementedRuntimeServiceHandler) RemovePodSandbox

func (UnimplementedRuntimeServiceHandler) ReopenContainerLog

func (UnimplementedRuntimeServiceHandler) RunPodSandbox

func (UnimplementedRuntimeServiceHandler) RuntimeConfig

func (UnimplementedRuntimeServiceHandler) StartContainer

func (UnimplementedRuntimeServiceHandler) Status

func (UnimplementedRuntimeServiceHandler) StopContainer

func (UnimplementedRuntimeServiceHandler) StopPodSandbox

func (UnimplementedRuntimeServiceHandler) UpdateContainerResources

func (UnimplementedRuntimeServiceHandler) UpdateRuntimeConfig

func (UnimplementedRuntimeServiceHandler) Version

Jump to

Keyboard shortcuts

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