RuntimeService

Trait RuntimeService 

Source
pub trait RuntimeService:
    Send
    + Sync
    + 'static {
    type GetContainerEventsStream: Stream<Item = Result<ContainerEventResponse, Status>> + Send + 'static;

Show 26 methods // Required methods fn version<'life0, 'async_trait>( &'life0 self, request: Request<VersionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VersionResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn run_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<RunPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RunPodSandboxResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<StopPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StopPodSandboxResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<RemovePodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemovePodSandboxResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn pod_sandbox_status<'life0, 'async_trait>( &'life0 self, request: Request<PodSandboxStatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PodSandboxStatusResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<ListPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListPodSandboxResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_container<'life0, 'async_trait>( &'life0 self, request: Request<CreateContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<CreateContainerResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn start_container<'life0, 'async_trait>( &'life0 self, request: Request<StartContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StartContainerResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop_container<'life0, 'async_trait>( &'life0 self, request: Request<StopContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StopContainerResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_container<'life0, 'async_trait>( &'life0 self, request: Request<RemoveContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemoveContainerResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_containers<'life0, 'async_trait>( &'life0 self, request: Request<ListContainersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListContainersResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn container_status<'life0, 'async_trait>( &'life0 self, request: Request<ContainerStatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ContainerStatusResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_container_resources<'life0, 'async_trait>( &'life0 self, request: Request<UpdateContainerResourcesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UpdateContainerResourcesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn reopen_container_log<'life0, 'async_trait>( &'life0 self, request: Request<ReopenContainerLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ReopenContainerLogResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn exec_sync<'life0, 'async_trait>( &'life0 self, request: Request<ExecSyncRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecSyncResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn exec<'life0, 'async_trait>( &'life0 self, request: Request<ExecRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn attach<'life0, 'async_trait>( &'life0 self, request: Request<AttachRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AttachResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn port_forward<'life0, 'async_trait>( &'life0 self, request: Request<PortForwardRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PortForwardResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn container_stats<'life0, 'async_trait>( &'life0 self, request: Request<ContainerStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ContainerStatsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_container_stats<'life0, 'async_trait>( &'life0 self, request: Request<ListContainerStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListContainerStatsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn pod_sandbox_stats<'life0, 'async_trait>( &'life0 self, request: Request<PodSandboxStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PodSandboxStatsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_pod_sandbox_stats<'life0, 'async_trait>( &'life0 self, request: Request<ListPodSandboxStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListPodSandboxStatsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_runtime_config<'life0, 'async_trait>( &'life0 self, request: Request<UpdateRuntimeConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UpdateRuntimeConfigResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn status<'life0, 'async_trait>( &'life0 self, request: Request<StatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StatusResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn checkpoint_container<'life0, 'async_trait>( &'life0 self, request: Request<CheckpointContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<CheckpointContainerResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_container_events<'life0, 'async_trait>( &'life0 self, request: Request<GetEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetContainerEventsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with RuntimeServiceServer.

Required Associated Types§

Source

type GetContainerEventsStream: Stream<Item = Result<ContainerEventResponse, Status>> + Send + 'static

Server streaming response type for the GetContainerEvents method.

Required Methods§

Source

fn version<'life0, 'async_trait>( &'life0 self, request: Request<VersionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VersionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn run_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<RunPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RunPodSandboxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn stop_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<StopPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StopPodSandboxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Source

fn remove_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<RemovePodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemovePodSandboxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Source

fn pod_sandbox_status<'life0, 'async_trait>( &'life0 self, request: Request<PodSandboxStatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PodSandboxStatusResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn list_pod_sandbox<'life0, 'async_trait>( &'life0 self, request: Request<ListPodSandboxRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListPodSandboxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ListPodSandbox returns a list of PodSandboxes.

Source

fn create_container<'life0, 'async_trait>( &'life0 self, request: Request<CreateContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<CreateContainerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

CreateContainer creates a new container in specified PodSandbox

Source

fn start_container<'life0, 'async_trait>( &'life0 self, request: Request<StartContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StartContainerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

StartContainer starts the container.

Source

fn stop_container<'life0, 'async_trait>( &'life0 self, request: Request<StopContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StopContainerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Source

fn remove_container<'life0, 'async_trait>( &'life0 self, request: Request<RemoveContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemoveContainerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Source

fn list_containers<'life0, 'async_trait>( &'life0 self, request: Request<ListContainersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListContainersResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ListContainers lists all containers by filters.

Source

fn container_status<'life0, 'async_trait>( &'life0 self, request: Request<ContainerStatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ContainerStatusResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn update_container_resources<'life0, 'async_trait>( &'life0 self, request: Request<UpdateContainerResourcesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UpdateContainerResourcesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

UpdateContainerResources updates ContainerConfig of the container synchronously. If runtime fails to transactionally update the requested resources, an error is returned.

Source

fn reopen_container_log<'life0, 'async_trait>( &'life0 self, request: Request<ReopenContainerLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ReopenContainerLogResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Source

fn exec_sync<'life0, 'async_trait>( &'life0 self, request: Request<ExecSyncRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecSyncResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ExecSync runs a command in a container synchronously.

Source

fn exec<'life0, 'async_trait>( &'life0 self, request: Request<ExecRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn attach<'life0, 'async_trait>( &'life0 self, request: Request<AttachRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AttachResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn port_forward<'life0, 'async_trait>( &'life0 self, request: Request<PortForwardRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PortForwardResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn container_stats<'life0, 'async_trait>( &'life0 self, request: Request<ContainerStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ContainerStatsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn list_container_stats<'life0, 'async_trait>( &'life0 self, request: Request<ListContainerStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListContainerStatsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ListContainerStats returns stats of all running containers.

Source

fn pod_sandbox_stats<'life0, 'async_trait>( &'life0 self, request: Request<PodSandboxStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PodSandboxStatsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn list_pod_sandbox_stats<'life0, 'async_trait>( &'life0 self, request: Request<ListPodSandboxStatsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListPodSandboxStatsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

ListPodSandboxStats returns stats of the pod sandboxes matching a filter.

Source

fn update_runtime_config<'life0, 'async_trait>( &'life0 self, request: Request<UpdateRuntimeConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UpdateRuntimeConfigResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

UpdateRuntimeConfig updates the runtime configuration based on the given request.

Source

fn status<'life0, 'async_trait>( &'life0 self, request: Request<StatusRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StatusResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Status returns the status of the runtime.

Source

fn checkpoint_container<'life0, 'async_trait>( &'life0 self, request: Request<CheckpointContainerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<CheckpointContainerResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

CheckpointContainer checkpoints a container

Source

fn get_container_events<'life0, 'async_trait>( &'life0 self, request: Request<GetEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetContainerEventsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GetContainerEvents gets container events from the CRI runtime

Implementors§