kubernetes: k8s.io/kubernetes/pkg/kubelet/remote/fake Index | Files

package fake

import "k8s.io/kubernetes/pkg/kubelet/remote/fake"

Package fake containers a fake gRPC implementation of internalapi.RuntimeService and internalapi.ImageManagerService.

Index

Package Files

doc.go endpoint.go fake_image_service.go fake_runtime.go

func GenerateEndpoint Uses

func GenerateEndpoint() (string, error)

GenerateEndpoint generates a new unix socket server of grpc server.

type RemoteRuntime Uses

type RemoteRuntime struct {

    // Fake runtime service.
    RuntimeService *apitest.FakeRuntimeService
    // Fake image service.
    ImageService *apitest.FakeImageService
    // contains filtered or unexported fields
}

RemoteRuntime represents a fake remote container runtime.

func NewFakeRemoteRuntime Uses

func NewFakeRemoteRuntime() *RemoteRuntime

NewFakeRemoteRuntime creates a new RemoteRuntime.

func (*RemoteRuntime) Attach Uses

func (f *RemoteRuntime) Attach(ctx context.Context, req *kubeapi.AttachRequest) (*kubeapi.AttachResponse, error)

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

func (*RemoteRuntime) ContainerStats Uses

func (f *RemoteRuntime) ContainerStats(ctx context.Context, req *kubeapi.ContainerStatsRequest) (*kubeapi.ContainerStatsResponse, error)

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

func (*RemoteRuntime) ContainerStatus Uses

func (f *RemoteRuntime) ContainerStatus(ctx context.Context, req *kubeapi.ContainerStatusRequest) (*kubeapi.ContainerStatusResponse, error)

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

func (*RemoteRuntime) CreateContainer Uses

func (f *RemoteRuntime) CreateContainer(ctx context.Context, req *kubeapi.CreateContainerRequest) (*kubeapi.CreateContainerResponse, error)

CreateContainer creates a new container in specified PodSandbox

func (*RemoteRuntime) Exec Uses

func (f *RemoteRuntime) Exec(ctx context.Context, req *kubeapi.ExecRequest) (*kubeapi.ExecResponse, error)

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

func (*RemoteRuntime) ExecSync Uses

func (f *RemoteRuntime) ExecSync(ctx context.Context, req *kubeapi.ExecSyncRequest) (*kubeapi.ExecSyncResponse, error)

ExecSync runs a command in a container synchronously.

func (*RemoteRuntime) ImageFsInfo Uses

func (f *RemoteRuntime) ImageFsInfo(ctx context.Context, req *kubeapi.ImageFsInfoRequest) (*kubeapi.ImageFsInfoResponse, error)

ImageFsInfo returns information of the filesystem that is used to store images.

func (*RemoteRuntime) ImageStatus Uses

func (f *RemoteRuntime) ImageStatus(ctx context.Context, req *kubeapi.ImageStatusRequest) (*kubeapi.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 (*RemoteRuntime) ListContainerStats Uses

func (f *RemoteRuntime) ListContainerStats(ctx context.Context, req *kubeapi.ListContainerStatsRequest) (*kubeapi.ListContainerStatsResponse, error)

ListContainerStats returns stats of all running containers.

func (*RemoteRuntime) ListContainers Uses

func (f *RemoteRuntime) ListContainers(ctx context.Context, req *kubeapi.ListContainersRequest) (*kubeapi.ListContainersResponse, error)

ListContainers lists all containers by filters.

func (*RemoteRuntime) ListImages Uses

func (f *RemoteRuntime) ListImages(ctx context.Context, req *kubeapi.ListImagesRequest) (*kubeapi.ListImagesResponse, error)

ListImages lists existing images.

func (*RemoteRuntime) ListPodSandbox Uses

func (f *RemoteRuntime) ListPodSandbox(ctx context.Context, req *kubeapi.ListPodSandboxRequest) (*kubeapi.ListPodSandboxResponse, error)

ListPodSandbox returns a list of PodSandboxes.

func (*RemoteRuntime) PodSandboxStatus Uses

func (f *RemoteRuntime) PodSandboxStatus(ctx context.Context, req *kubeapi.PodSandboxStatusRequest) (*kubeapi.PodSandboxStatusResponse, error)

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

func (*RemoteRuntime) PortForward Uses

func (f *RemoteRuntime) PortForward(ctx context.Context, req *kubeapi.PortForwardRequest) (*kubeapi.PortForwardResponse, error)

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

func (*RemoteRuntime) PullImage Uses

func (f *RemoteRuntime) PullImage(ctx context.Context, req *kubeapi.PullImageRequest) (*kubeapi.PullImageResponse, error)

PullImage pulls an image with authentication config.

func (*RemoteRuntime) RemoveContainer Uses

func (f *RemoteRuntime) RemoveContainer(ctx context.Context, req *kubeapi.RemoveContainerRequest) (*kubeapi.RemoveContainerResponse, 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.

func (*RemoteRuntime) RemoveImage Uses

func (f *RemoteRuntime) RemoveImage(ctx context.Context, req *kubeapi.RemoveImageRequest) (*kubeapi.RemoveImageResponse, error)

RemoveImage removes the image. This call is idempotent, and must not return an error if the image has already been removed.

func (*RemoteRuntime) RemovePodSandbox Uses

func (f *RemoteRuntime) RemovePodSandbox(ctx context.Context, req *kubeapi.RemovePodSandboxRequest) (*kubeapi.RemovePodSandboxResponse, 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.

func (*RemoteRuntime) ReopenContainerLog Uses

func (f *RemoteRuntime) ReopenContainerLog(ctx context.Context, req *kubeapi.ReopenContainerLogRequest) (*kubeapi.ReopenContainerLogResponse, error)

ReopenContainerLog reopens the container log file.

func (*RemoteRuntime) RunPodSandbox Uses

func (f *RemoteRuntime) RunPodSandbox(ctx context.Context, req *kubeapi.RunPodSandboxRequest) (*kubeapi.RunPodSandboxResponse, error)

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

func (*RemoteRuntime) Start Uses

func (f *RemoteRuntime) Start(endpoint string) error

Start starts the fake remote runtime.

func (*RemoteRuntime) StartContainer Uses

func (f *RemoteRuntime) StartContainer(ctx context.Context, req *kubeapi.StartContainerRequest) (*kubeapi.StartContainerResponse, error)

StartContainer starts the container.

func (*RemoteRuntime) Status Uses

func (f *RemoteRuntime) Status(ctx context.Context, req *kubeapi.StatusRequest) (*kubeapi.StatusResponse, error)

Status returns the status of the runtime.

func (*RemoteRuntime) Stop Uses

func (f *RemoteRuntime) Stop()

Stop stops the fake remote runtime.

func (*RemoteRuntime) StopContainer Uses

func (f *RemoteRuntime) StopContainer(ctx context.Context, req *kubeapi.StopContainerRequest) (*kubeapi.StopContainerResponse, 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.

func (*RemoteRuntime) StopPodSandbox Uses

func (f *RemoteRuntime) StopPodSandbox(ctx context.Context, req *kubeapi.StopPodSandboxRequest) (*kubeapi.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. If there are any running containers in the sandbox, they must be forcibly terminated.

func (*RemoteRuntime) UpdateContainerResources Uses

func (f *RemoteRuntime) UpdateContainerResources(ctx context.Context, req *kubeapi.UpdateContainerResourcesRequest) (*kubeapi.UpdateContainerResourcesResponse, error)

UpdateContainerResources updates ContainerConfig of the container.

func (*RemoteRuntime) UpdateRuntimeConfig Uses

func (f *RemoteRuntime) UpdateRuntimeConfig(ctx context.Context, req *kubeapi.UpdateRuntimeConfigRequest) (*kubeapi.UpdateRuntimeConfigResponse, error)

UpdateRuntimeConfig updates the runtime configuration based on the given request.

func (*RemoteRuntime) Version Uses

func (f *RemoteRuntime) Version(ctx context.Context, req *kubeapi.VersionRequest) (*kubeapi.VersionResponse, error)

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

Package fake imports 8 packages (graph). Updated 2019-04-11. Refresh now. Tools for package owners.