Documentation ¶
Index ¶
- Constants
- func CreateTarStreamToTarWriter(dir string, includeDirInPath bool, tarWriter *tar.Writer, logger io.Writer, ...) error
- type DockerClient
- func (cli *DockerClient) BuildImage(ctx context.Context, req *pb.DockerImageBuildReqResp) (*pb.DockerImageBuildReqResp, error)
- func (cli *DockerClient) CreateNetwork(ctx context.Context, req *pb.DockerNetworkCreateReqResp) (*pb.DockerNetworkCreateReqResp, error)
- func (cli *DockerClient) InspectContainer(ctx context.Context, req *pb.DockerContainerInspectReqResp) (*pb.DockerContainerInspectReqResp, error)
- func (cli *DockerClient) InspectImage(ctx context.Context, req *pb.DockerImageInspectReqResp) (*pb.DockerImageInspectReqResp, error)
- func (cli *DockerClient) InspectNetwork(ctx context.Context, req *pb.DockerNetworkInspectReqResp) (*pb.DockerNetworkInspectReqResp, error)
- func (cli *DockerClient) ListContainers(ctx context.Context, req *pb.DockerContainerListReqResp) (*pb.DockerContainerListReqResp, error)
- func (cli *DockerClient) ListImages(ctx context.Context, req *pb.DockerImageListReqResp) (*pb.DockerImageListReqResp, error)
- func (cli *DockerClient) ListNetworks(ctx context.Context, req *pb.DockerNetworkListReqResp) (*pb.DockerNetworkListReqResp, error)
- func (cli *DockerClient) PruneContainers(ctx context.Context, req *pb.DockerContainerPruneReqResp) (*pb.DockerContainerPruneReqResp, error)
- func (cli *DockerClient) PruneImages(ctx context.Context, req *pb.DockerImagePruneReqResp) (*pb.DockerImagePruneReqResp, error)
- func (cli *DockerClient) PruneNetworks(ctx context.Context, req *pb.DockerNetworkPruneReqResp) (*pb.DockerNetworkPruneReqResp, error)
- func (cli *DockerClient) PullImage(ctx context.Context, req *pb.DockerImagePullReqResp) (*pb.DockerImagePullReqResp, error)
- func (cli *DockerClient) PushImage(ctx context.Context, req *pb.DockerImagePushReqResp) (*pb.DockerImagePushReqResp, error)
- func (cli *DockerClient) RemoveContainer(ctx context.Context, req *pb.DockerContainerRemoveReqResp) (*pb.DockerContainerRemoveReqResp, error)
- func (cli *DockerClient) RemoveImage(ctx context.Context, req *pb.DockerImageRemoveReqResp) (*pb.DockerImageRemoveReqResp, error)
- func (cli *DockerClient) RemoveNetwork(ctx context.Context, req *pb.DockerNetworkRemoveReqResp) (*pb.DockerNetworkRemoveReqResp, error)
- func (cli *DockerClient) RunContainer(ctx context.Context, req *pb.DockerContainerRunReqResp) (*pb.DockerContainerRunReqResp, error)
Constants ¶
View Source
const ( ILLEGAL_PARAMETER = 1000 DOCKER_NOT_READY = 1001 IMAGE_PULL_STARTED = 1 IMAGE_PUSH_STARTED = 1 IMAGE_BUILD_STARTED = 1 IMAGE_BUILD_NOT_RESPONSED = 80 )
Variables ¶
This section is empty.
Functions ¶
func CreateTarStreamToTarWriter ¶
func CreateTarStreamToTarWriter(dir string, includeDirInPath bool, tarWriter *tar.Writer, logger io.Writer, shouldExclude shouldExcludePathFn) error
CreateTarStreamToTarWriter creates a tar stream on the given writer from the given directory while excluding files that match the given exclusion pattern.
Types ¶
type DockerClient ¶
type DockerClient struct { DockerApiClient *dockerapi.Client // criHandler dockershim.DockerService KubeDockerClient libdocker.Interface }
func NewOrDie ¶
func NewOrDie() *DockerClient
refer to
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet.go#L614-L620 ds, err := dockershim.NewDockerService(kubeDeps.DockerClientConfig, crOptions.PodSandboxImage, streamingConfig, &pluginSettings, runtimeCgroups, kubeCfg.CgroupDriver, crOptions.DockershimRootDirectory, !crOptions.RedirectContainerStreaming) if err != nil { return nil, err } if crOptions.RedirectContainerStreaming { klet.criHandler = ds }
...
func (*DockerClient) BuildImage ¶
func (cli *DockerClient) BuildImage(ctx context.Context, req *pb.DockerImageBuildReqResp) (*pb.DockerImageBuildReqResp, error)
func (*DockerClient) CreateNetwork ¶
func (cli *DockerClient) CreateNetwork(ctx context.Context, req *pb.DockerNetworkCreateReqResp) (*pb.DockerNetworkCreateReqResp, error)
func (*DockerClient) InspectContainer ¶
func (cli *DockerClient) InspectContainer(ctx context.Context, req *pb.DockerContainerInspectReqResp) (*pb.DockerContainerInspectReqResp, error)
func (*DockerClient) InspectImage ¶
func (cli *DockerClient) InspectImage(ctx context.Context, req *pb.DockerImageInspectReqResp) (*pb.DockerImageInspectReqResp, error)
func (*DockerClient) InspectNetwork ¶
func (cli *DockerClient) InspectNetwork(ctx context.Context, req *pb.DockerNetworkInspectReqResp) (*pb.DockerNetworkInspectReqResp, error)
func (*DockerClient) ListContainers ¶
func (cli *DockerClient) ListContainers(ctx context.Context, req *pb.DockerContainerListReqResp) (*pb.DockerContainerListReqResp, error)
func (*DockerClient) ListImages ¶
func (cli *DockerClient) ListImages(ctx context.Context, req *pb.DockerImageListReqResp) (*pb.DockerImageListReqResp, error)
func (*DockerClient) ListNetworks ¶
func (cli *DockerClient) ListNetworks(ctx context.Context, req *pb.DockerNetworkListReqResp) (*pb.DockerNetworkListReqResp, error)
func (*DockerClient) PruneContainers ¶
func (cli *DockerClient) PruneContainers(ctx context.Context, req *pb.DockerContainerPruneReqResp) (*pb.DockerContainerPruneReqResp, error)
func (*DockerClient) PruneImages ¶
func (cli *DockerClient) PruneImages(ctx context.Context, req *pb.DockerImagePruneReqResp) (*pb.DockerImagePruneReqResp, error)
func (*DockerClient) PruneNetworks ¶
func (cli *DockerClient) PruneNetworks(ctx context.Context, req *pb.DockerNetworkPruneReqResp) (*pb.DockerNetworkPruneReqResp, error)
func (*DockerClient) PullImage ¶
func (cli *DockerClient) PullImage(ctx context.Context, req *pb.DockerImagePullReqResp) (*pb.DockerImagePullReqResp, error)
func (*DockerClient) PushImage ¶
func (cli *DockerClient) PushImage(ctx context.Context, req *pb.DockerImagePushReqResp) (*pb.DockerImagePushReqResp, error)
func (*DockerClient) RemoveContainer ¶
func (cli *DockerClient) RemoveContainer(ctx context.Context, req *pb.DockerContainerRemoveReqResp) (*pb.DockerContainerRemoveReqResp, error)
func (*DockerClient) RemoveImage ¶
func (cli *DockerClient) RemoveImage(ctx context.Context, req *pb.DockerImageRemoveReqResp) (*pb.DockerImageRemoveReqResp, error)
func (*DockerClient) RemoveNetwork ¶
func (cli *DockerClient) RemoveNetwork(ctx context.Context, req *pb.DockerNetworkRemoveReqResp) (*pb.DockerNetworkRemoveReqResp, error)
func (*DockerClient) RunContainer ¶
func (cli *DockerClient) RunContainer(ctx context.Context, req *pb.DockerContainerRunReqResp) (*pb.DockerContainerRunReqResp, error)
Click to show internal directories.
Click to hide internal directories.