Documentation ¶
Index ¶
- type Service
- func (s *Service) Attach(ctx context.Context, r *criapi.AttachRequest) (*criapi.AttachResponse, error)
- func (s *Service) ContainerStats(ctx context.Context, r *criapi.ContainerStatsRequest) (*criapi.ContainerStatsResponse, error)
- func (s *Service) ContainerStatus(ctx context.Context, r *criapi.ContainerStatusRequest) (*criapi.ContainerStatusResponse, error)
- func (s *Service) CreateContainer(ctx context.Context, r *criapi.CreateContainerRequest) (*criapi.CreateContainerResponse, error)
- func (s *Service) Exec(ctx context.Context, r *criapi.ExecRequest) (*criapi.ExecResponse, error)
- func (s *Service) ExecSync(ctx context.Context, r *criapi.ExecSyncRequest) (*criapi.ExecSyncResponse, error)
- func (s *Service) ImageFsInfo(ctx context.Context, r *criapi.ImageFsInfoRequest) (*criapi.ImageFsInfoResponse, error)
- func (s *Service) ImageStatus(ctx context.Context, r *criapi.ImageStatusRequest) (*criapi.ImageStatusResponse, error)
- func (s *Service) ListContainerStats(ctx context.Context, r *criapi.ListContainerStatsRequest) (*criapi.ListContainerStatsResponse, error)
- func (s *Service) ListContainers(ctx context.Context, r *criapi.ListContainersRequest) (*criapi.ListContainersResponse, error)
- func (s *Service) ListImages(ctx context.Context, r *criapi.ListImagesRequest) (*criapi.ListImagesResponse, error)
- func (s *Service) ListPodSandbox(ctx context.Context, r *criapi.ListPodSandboxRequest) (*criapi.ListPodSandboxResponse, error)
- func (s *Service) PodSandboxStatus(ctx context.Context, r *criapi.PodSandboxStatusRequest) (*criapi.PodSandboxStatusResponse, error)
- func (s *Service) PortForward(ctx context.Context, r *criapi.PortForwardRequest) (*criapi.PortForwardResponse, error)
- func (s *Service) PullImage(ctx context.Context, r *criapi.PullImageRequest) (*criapi.PullImageResponse, error)
- func (s *Service) Register(server *grpc.Server)
- func (s *Service) RemoveContainer(ctx context.Context, r *criapi.RemoveContainerRequest) (*criapi.RemoveContainerResponse, error)
- func (s *Service) RemoveImage(ctx context.Context, r *criapi.RemoveImageRequest) (*criapi.RemoveImageResponse, error)
- func (s *Service) RemovePodSandbox(ctx context.Context, r *criapi.RemovePodSandboxRequest) (*criapi.RemovePodSandboxResponse, error)
- func (s *Service) ReopenContainerLog(ctx context.Context, r *criapi.ReopenContainerLogRequest) (*criapi.ReopenContainerLogResponse, error)
- func (s *Service) RunPodSandbox(ctx context.Context, r *criapi.RunPodSandboxRequest) (*criapi.RunPodSandboxResponse, error)
- func (s *Service) StartContainer(ctx context.Context, r *criapi.StartContainerRequest) (*criapi.StartContainerResponse, error)
- func (s *Service) Status(ctx context.Context, r *criapi.StatusRequest) (*criapi.StatusResponse, error)
- func (s *Service) StopContainer(ctx context.Context, r *criapi.StopContainerRequest) (*criapi.StopContainerResponse, error)
- func (s *Service) StopPodSandbox(ctx context.Context, r *criapi.StopPodSandboxRequest) (*criapi.StopPodSandboxResponse, error)
- func (s *Service) UpdateContainerResources(ctx context.Context, r *criapi.UpdateContainerResourcesRequest) (*criapi.UpdateContainerResourcesResponse, error)
- func (s *Service) UpdateRuntimeConfig(ctx context.Context, r *criapi.UpdateRuntimeConfigRequest) (*criapi.UpdateRuntimeConfigResponse, error)
- func (s *Service) Version(ctx context.Context, r *criapi.VersionRequest) (*criapi.VersionResponse, error)
- type VMConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { sync.Mutex criapi.ImageServiceServer criapi.RuntimeServiceServer // contains filtered or unexported fields }
Service contains essential objects for host orchestration.
func NewService ¶
func NewService(orch *ctriface.Orchestrator) (*Service, error)
NewService initializes the host orchestration state.
func (*Service) Attach ¶
func (s *Service) Attach(ctx context.Context, r *criapi.AttachRequest) (*criapi.AttachResponse, error)
Attach prepares a streaming endpoint to attach to a running container.
func (*Service) ContainerStats ¶
func (s *Service) ContainerStats(ctx context.Context, r *criapi.ContainerStatsRequest) (*criapi.ContainerStatsResponse, error)
ContainerStats returns stats of the container. If the container does not exist, the call returns an error.
func (*Service) ContainerStatus ¶
func (s *Service) ContainerStatus(ctx context.Context, r *criapi.ContainerStatusRequest) (*criapi.ContainerStatusResponse, error)
ContainerStatus returns status of the container. If the container is not present, returns an error.
func (*Service) CreateContainer ¶
func (s *Service) CreateContainer(ctx context.Context, r *criapi.CreateContainerRequest) (*criapi.CreateContainerResponse, error)
CreateContainer starts a container or a VM, depending on the name if the name matches "user-container", the cri plugin starts a VM, assigning it an IP, otherwise starts a regular container
func (*Service) Exec ¶
func (s *Service) Exec(ctx context.Context, r *criapi.ExecRequest) (*criapi.ExecResponse, error)
Exec prepares a streaming endpoint to execute a command in the container.
func (*Service) ExecSync ¶
func (s *Service) ExecSync(ctx context.Context, r *criapi.ExecSyncRequest) (*criapi.ExecSyncResponse, error)
ExecSync runs a command in a container synchronously.
func (*Service) ImageFsInfo ¶
func (s *Service) ImageFsInfo(ctx context.Context, r *criapi.ImageFsInfoRequest) (*criapi.ImageFsInfoResponse, error)
ImageFsInfo returns information of the filesystem that is used to store images.
func (*Service) ImageStatus ¶
func (s *Service) ImageStatus(ctx context.Context, r *criapi.ImageStatusRequest) (*criapi.ImageStatusResponse, error)
ImageStatus returns the status of the image. If the image is not present, returns a response with ImageStatusResponse.Image set to nil.
func (*Service) ListContainerStats ¶
func (s *Service) ListContainerStats(ctx context.Context, r *criapi.ListContainerStatsRequest) (*criapi.ListContainerStatsResponse, error)
ListContainerStats returns stats of all running containers.
func (*Service) ListContainers ¶
func (s *Service) ListContainers(ctx context.Context, r *criapi.ListContainersRequest) (*criapi.ListContainersResponse, error)
ListContainers lists all containers by filters.
func (*Service) ListImages ¶
func (s *Service) ListImages(ctx context.Context, r *criapi.ListImagesRequest) (*criapi.ListImagesResponse, error)
ListImages lists existing images.
func (*Service) ListPodSandbox ¶
func (s *Service) ListPodSandbox(ctx context.Context, r *criapi.ListPodSandboxRequest) (*criapi.ListPodSandboxResponse, error)
ListPodSandbox returns a list of PodSandboxes.
func (*Service) PodSandboxStatus ¶
func (s *Service) PodSandboxStatus(ctx context.Context, r *criapi.PodSandboxStatusRequest) (*criapi.PodSandboxStatusResponse, error)
PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not present, returns an error.
func (*Service) PortForward ¶
func (s *Service) PortForward(ctx context.Context, r *criapi.PortForwardRequest) (*criapi.PortForwardResponse, error)
PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
func (*Service) PullImage ¶
func (s *Service) PullImage(ctx context.Context, r *criapi.PullImageRequest) (*criapi.PullImageResponse, error)
PullImage pulls an image with authentication config.
func (*Service) RemoveContainer ¶
func (s *Service) RemoveContainer(ctx context.Context, r *criapi.RemoveContainerRequest) (*criapi.RemoveContainerResponse, error)
RemoveContainer removes a container or a VM
func (*Service) RemoveImage ¶
func (s *Service) RemoveImage(ctx context.Context, r *criapi.RemoveImageRequest) (*criapi.RemoveImageResponse, error)
RemoveImage removes the image.
func (*Service) RemovePodSandbox ¶
func (s *Service) RemovePodSandbox(ctx context.Context, r *criapi.RemovePodSandboxRequest) (*criapi.RemovePodSandboxResponse, error)
RemovePodSandbox removes the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated and removed.
func (*Service) ReopenContainerLog ¶
func (s *Service) ReopenContainerLog(ctx context.Context, r *criapi.ReopenContainerLogRequest) (*criapi.ReopenContainerLogResponse, error)
ReopenContainerLog asks runtime to reopen the stdout/stderr log file for the container.
func (*Service) RunPodSandbox ¶
func (s *Service) RunPodSandbox(ctx context.Context, r *criapi.RunPodSandboxRequest) (*criapi.RunPodSandboxResponse, error)
RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure the sandbox is in the ready state on success.
func (*Service) StartContainer ¶
func (s *Service) StartContainer(ctx context.Context, r *criapi.StartContainerRequest) (*criapi.StartContainerResponse, error)
StartContainer starts the container.
func (*Service) Status ¶
func (s *Service) Status(ctx context.Context, r *criapi.StatusRequest) (*criapi.StatusResponse, error)
Status returns the status of the runtime.
func (*Service) StopContainer ¶
func (s *Service) StopContainer(ctx context.Context, r *criapi.StopContainerRequest) (*criapi.StopContainerResponse, error)
StopContainer stops a running container with a grace period (i.e., timeout).
func (*Service) StopPodSandbox ¶
func (s *Service) StopPodSandbox(ctx context.Context, r *criapi.StopPodSandboxRequest) (*criapi.StopPodSandboxResponse, error)
StopPodSandbox stops any running process that is part of the sandbox and reclaims network resources (e.g., IP addresses) allocated to the sandbox.
func (*Service) UpdateContainerResources ¶
func (s *Service) UpdateContainerResources(ctx context.Context, r *criapi.UpdateContainerResourcesRequest) (*criapi.UpdateContainerResourcesResponse, error)
UpdateContainerResources updates ContainerConfig of the container.
func (*Service) UpdateRuntimeConfig ¶
func (s *Service) UpdateRuntimeConfig(ctx context.Context, r *criapi.UpdateRuntimeConfigRequest) (*criapi.UpdateRuntimeConfigResponse, error)
UpdateRuntimeConfig updates the runtime configuration based on the given request.
func (*Service) Version ¶
func (s *Service) Version(ctx context.Context, r *criapi.VersionRequest) (*criapi.VersionResponse, error)
Version returns the runtime name, runtime version, and runtime API version.