Documentation ¶
Overview ¶
Package remote containers gRPC implementation of internalapi.RuntimeService and internalapi.ImageManagerService.
Index ¶
- func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (internalapi.ImageManagerService, error)
- func NewRemoteRuntimeService(endpoint string, connectionTimout time.Duration) (internalapi.RuntimeService, error)
- type RemoteImageService
- func (r *RemoteImageService) ImageFsInfo(req *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
- func (r *RemoteImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error)
- func (r *RemoteImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error)
- func (r *RemoteImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig) (string, error)
- func (r *RemoteImageService) RemoveImage(image *runtimeapi.ImageSpec) error
- type RemoteRuntimeService
- func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
- func (r *RemoteRuntimeService) ContainerStats(req *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
- func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error)
- func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, ...) (string, error)
- func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
- func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error)
- func (r *RemoteRuntimeService) ListContainerStats(req *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
- func (r *RemoteRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error)
- func (r *RemoteRuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
- func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error)
- func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
- func (r *RemoteRuntimeService) RemoveContainer(containerID string) error
- func (r *RemoteRuntimeService) RemovePodSandbox(podSandBoxID string) error
- func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (string, error)
- func (r *RemoteRuntimeService) StartContainer(containerID string) error
- func (r *RemoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error)
- func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) error
- func (r *RemoteRuntimeService) StopPodSandbox(podSandBoxID string) error
- func (r *RemoteRuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) error
- func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRemoteImageService ¶
func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (internalapi.ImageManagerService, error)
NewRemoteImageService creates a new internalapi.ImageManagerService.
func NewRemoteRuntimeService ¶
func NewRemoteRuntimeService(endpoint string, connectionTimout time.Duration) (internalapi.RuntimeService, error)
NewRemoteRuntimeService creates a new internalapi.RuntimeService.
Types ¶
type RemoteImageService ¶
type RemoteImageService struct {
// contains filtered or unexported fields
}
RemoteImageService is a gRPC implementation of internalapi.ImageManagerService.
func (*RemoteImageService) ImageFsInfo ¶
func (r *RemoteImageService) ImageFsInfo(req *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
ImageFsInfo returns information of the filesystem that is used to store images.
func (*RemoteImageService) ImageStatus ¶
func (r *RemoteImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error)
ImageStatus returns the status of the image.
func (*RemoteImageService) ListImages ¶
func (r *RemoteImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error)
ListImages lists available images.
func (*RemoteImageService) PullImage ¶
func (r *RemoteImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig) (string, error)
PullImage pulls an image with authentication config.
func (*RemoteImageService) RemoveImage ¶
func (r *RemoteImageService) RemoveImage(image *runtimeapi.ImageSpec) error
RemoveImage removes the image.
type RemoteRuntimeService ¶
type RemoteRuntimeService struct {
// contains filtered or unexported fields
}
RemoteRuntimeService is a gRPC implementation of internalapi.RuntimeService.
func (*RemoteRuntimeService) Attach ¶
func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
Attach prepares a streaming endpoint to attach to a running container, and returns the address.
func (*RemoteRuntimeService) ContainerStats ¶
func (r *RemoteRuntimeService) ContainerStats(req *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
func (*RemoteRuntimeService) ContainerStatus ¶
func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error)
ContainerStatus returns the container status.
func (*RemoteRuntimeService) CreateContainer ¶
func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, sandboxConfig *runtimeapi.PodSandboxConfig) (string, error)
CreateContainer creates a new container in the specified PodSandbox.
func (*RemoteRuntimeService) Exec ¶
func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
Exec prepares a streaming endpoint to execute a command in the container, and returns the address.
func (*RemoteRuntimeService) ExecSync ¶
func (r *RemoteRuntimeService) 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 (*RemoteRuntimeService) ListContainerStats ¶
func (r *RemoteRuntimeService) ListContainerStats(req *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
func (*RemoteRuntimeService) ListContainers ¶
func (r *RemoteRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error)
ListContainers lists containers by filters.
func (*RemoteRuntimeService) ListPodSandbox ¶
func (r *RemoteRuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
ListPodSandbox returns a list of PodSandboxes.
func (*RemoteRuntimeService) PodSandboxStatus ¶
func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error)
PodSandboxStatus returns the status of the PodSandbox.
func (*RemoteRuntimeService) PortForward ¶
func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
func (*RemoteRuntimeService) RemoveContainer ¶
func (r *RemoteRuntimeService) RemoveContainer(containerID string) error
RemoveContainer removes the container. If the container is running, the container should be forced to removal.
func (*RemoteRuntimeService) RemovePodSandbox ¶
func (r *RemoteRuntimeService) RemovePodSandbox(podSandBoxID string) error
RemovePodSandbox removes the sandbox. If there are any containers in the sandbox, they should be forcibly removed.
func (*RemoteRuntimeService) RunPodSandbox ¶
func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (string, error)
RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure the sandbox is in ready state.
func (*RemoteRuntimeService) StartContainer ¶
func (r *RemoteRuntimeService) StartContainer(containerID string) error
StartContainer starts the container.
func (*RemoteRuntimeService) Status ¶
func (r *RemoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error)
Status returns the status of the runtime.
func (*RemoteRuntimeService) StopContainer ¶
func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) error
StopContainer stops a running container with a grace period (i.e., timeout).
func (*RemoteRuntimeService) StopPodSandbox ¶
func (r *RemoteRuntimeService) StopPodSandbox(podSandBoxID string) error
StopPodSandbox stops the sandbox. If there are any running containers in the sandbox, they should be forced to termination.
func (*RemoteRuntimeService) UpdateRuntimeConfig ¶
func (r *RemoteRuntimeService) 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 (*RemoteRuntimeService) Version ¶
func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionResponse, error)
Version returns the runtime name, runtime version and runtime API version.