Documentation ¶
Overview ¶
Package remote contains gRPC implementation of internalapi.RuntimeService and internalapi.ImageManagerService.
Index ¶
- func NewImageService(endpoint string, connectionTimeout time.Duration) (internalapi.ImageManagerService, error)
- func NewRuntimeService(endpoint string, connectionTimeout time.Duration) (internalapi.RuntimeService, error)
- type ImageService
- func (r *ImageService) ImageFsInfo() ([]*runtimeapi.FilesystemUsage, error)
- func (r *ImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error)
- func (r *ImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error)
- func (r *ImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig, ...) (string, error)
- func (r *ImageService) RemoveImage(image *runtimeapi.ImageSpec) error
- type RuntimeService
- func (r *RuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
- func (r *RuntimeService) ContainerStats(containerID string) (*runtimeapi.ContainerStats, error)
- func (r *RuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error)
- func (r *RuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, ...) (string, error)
- func (r *RuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
- func (r *RuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error)
- func (r *RuntimeService) ListContainerStats(filter *runtimeapi.ContainerStatsFilter) ([]*runtimeapi.ContainerStats, error)
- func (r *RuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error)
- func (r *RuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
- func (r *RuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error)
- func (r *RuntimeService) PortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
- func (r *RuntimeService) RemoveContainer(containerID string) error
- func (r *RuntimeService) RemovePodSandbox(podSandBoxID string) error
- func (r *RuntimeService) ReopenContainerLog(containerID string) error
- func (r *RuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error)
- func (r *RuntimeService) StartContainer(containerID string) error
- func (r *RuntimeService) Status() (*runtimeapi.RuntimeStatus, error)
- func (r *RuntimeService) StopContainer(containerID string, timeout int64) error
- func (r *RuntimeService) StopPodSandbox(podSandBoxID string) error
- func (r *RuntimeService) UpdateContainerResources(containerID string, resources *runtimeapi.LinuxContainerResources) error
- func (r *RuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) error
- func (r *RuntimeService) Version(apiVersion string) (*runtimeapi.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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() ([]*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) (*runtimeapi.Image, error)
ImageStatus returns the status of the image.
func (*ImageService) ListImages ¶
func (r *ImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error)
ListImages lists available images.
func (*ImageService) PullImage ¶
func (r *ImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, error)
PullImage pulls an image with authentication config.
func (*ImageService) RemoveImage ¶
func (r *ImageService) RemoveImage(image *runtimeapi.ImageSpec) 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 ¶
func (r *RuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
Attach prepares a streaming endpoint to attach to a running container, and returns the address.
func (*RuntimeService) ContainerStats ¶
func (r *RuntimeService) ContainerStats(containerID string) (*runtimeapi.ContainerStats, error)
ContainerStats returns the stats of the container.
func (*RuntimeService) ContainerStatus ¶
func (r *RuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error)
ContainerStatus returns the container status.
func (*RuntimeService) CreateContainer ¶
func (r *RuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, sandboxConfig *runtimeapi.PodSandboxConfig) (string, error)
CreateContainer creates a new container in the specified PodSandbox.
func (*RuntimeService) Exec ¶
func (r *RuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
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) (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) ListContainerStats ¶
func (r *RuntimeService) ListContainerStats(filter *runtimeapi.ContainerStatsFilter) ([]*runtimeapi.ContainerStats, error)
func (*RuntimeService) ListContainers ¶
func (r *RuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error)
ListContainers lists containers by filters.
func (*RuntimeService) ListPodSandbox ¶
func (r *RuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
ListPodSandbox returns a list of PodSandboxes.
func (*RuntimeService) PodSandboxStatus ¶
func (r *RuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error)
PodSandboxStatus returns the status of the PodSandbox.
func (*RuntimeService) PortForward ¶
func (r *RuntimeService) PortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
func (*RuntimeService) RemoveContainer ¶
func (r *RuntimeService) RemoveContainer(containerID string) 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) 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) error
func (*RuntimeService) RunPodSandbox ¶
func (r *RuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string) (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) error
StartContainer starts the container.
func (*RuntimeService) Status ¶
func (r *RuntimeService) Status() (*runtimeapi.RuntimeStatus, error)
Status returns the status of the runtime.
func (*RuntimeService) StopContainer ¶
func (r *RuntimeService) StopContainer(containerID string, timeout int64) error
StopContainer stops a running container with a grace period (i.e., timeout).
func (*RuntimeService) StopPodSandbox ¶
func (r *RuntimeService) StopPodSandbox(podSandBoxID string) 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) error
UpdateContainerResources updates a containers resource config
func (*RuntimeService) UpdateRuntimeConfig ¶
func (r *RuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) 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) (*runtimeapi.VersionResponse, error)
Version returns the runtime name, runtime version and runtime API version.