kubernetes: k8s.io/kubernetes/cmd/kubeadm/app/util/runtime Index | Files

package util

import "k8s.io/kubernetes/cmd/kubeadm/app/util/runtime"

Index

Package Files

runtime.go runtime_unix.go

func DetectCRISocket Uses

func DetectCRISocket() (string, error)

DetectCRISocket uses a list of known CRI sockets to detect one. If more than one or none is discovered, an error is returned.

type CRIRuntime Uses

type CRIRuntime struct {
    // contains filtered or unexported fields
}

CRIRuntime is a struct that interfaces with the CRI

func (*CRIRuntime) ImageExists Uses

func (runtime *CRIRuntime) ImageExists(image string) (bool, error)

ImageExists checks to see if the image exists on the system

func (*CRIRuntime) IsDocker Uses

func (runtime *CRIRuntime) IsDocker() bool

IsDocker returns true if the runtime is docker

func (*CRIRuntime) IsRunning Uses

func (runtime *CRIRuntime) IsRunning() error

IsRunning checks if runtime is running

func (*CRIRuntime) ListKubeContainers Uses

func (runtime *CRIRuntime) ListKubeContainers() ([]string, error)

ListKubeContainers lists running k8s CRI pods

func (*CRIRuntime) PullImage Uses

func (runtime *CRIRuntime) PullImage(image string) error

PullImage pulls the image

func (*CRIRuntime) RemoveContainers Uses

func (runtime *CRIRuntime) RemoveContainers(containers []string) error

RemoveContainers removes running k8s pods

type ContainerRuntime Uses

type ContainerRuntime interface {
    IsDocker() bool
    IsRunning() error
    ListKubeContainers() ([]string, error)
    RemoveContainers(containers []string) error
    PullImage(image string) error
    ImageExists(image string) (bool, error)
}

ContainerRuntime is an interface for working with container runtimes

func NewContainerRuntime Uses

func NewContainerRuntime(execer utilsexec.Interface, criSocket string) (ContainerRuntime, error)

NewContainerRuntime sets up and returns a ContainerRuntime struct

type DockerRuntime Uses

type DockerRuntime struct {
    // contains filtered or unexported fields
}

DockerRuntime is a struct that interfaces with the Docker daemon

func (*DockerRuntime) ImageExists Uses

func (runtime *DockerRuntime) ImageExists(image string) (bool, error)

ImageExists checks to see if the image exists on the system

func (*DockerRuntime) IsDocker Uses

func (runtime *DockerRuntime) IsDocker() bool

IsDocker returns true if the runtime is docker

func (*DockerRuntime) IsRunning Uses

func (runtime *DockerRuntime) IsRunning() error

IsRunning checks if runtime is running

func (*DockerRuntime) ListKubeContainers Uses

func (runtime *DockerRuntime) ListKubeContainers() ([]string, error)

ListKubeContainers lists running k8s containers

func (*DockerRuntime) PullImage Uses

func (runtime *DockerRuntime) PullImage(image string) error

PullImage pulls the image

func (*DockerRuntime) RemoveContainers Uses

func (runtime *DockerRuntime) RemoveContainers(containers []string) error

RemoveContainers removes running containers

Package util imports 8 packages (graph) and is imported by 18 packages. Updated 2019-07-27. Refresh now. Tools for package owners.