rktshim

package
v1.4.0-beta.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rktshim is the package that contains the shim code for rkt to be used as the kubelet container runtime implementation that is integrated using the Container Runtime Interface.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContainerNotFound               = errors.New("rktshim: container not found")
	ErrInvalidContainerStateTransition = errors.New("rktshim: wrong container operation for current state")
)
View Source
var (
	ErrImageNotFound = errors.New("rktshim: image not found")
)

TODO(tmrts): Move these errors to the container API for code re-use.

Functions

func NewFakeRuntime

func NewFakeRuntime() (kubeletApi.ContainerManager, error)

func NewPodSandboxManager

NewPodSandboxManager creates a PodSandboxManager.

func NewRuntime

NewRuntime creates a container.Runtime instance using the Runtime.

Types

type FakeRuntime

type FakeRuntime struct {
	Containers containerRegistry
}

func (*FakeRuntime) ContainerStatus

func (r *FakeRuntime) ContainerStatus(id string) (*runtimeApi.ContainerStatus, error)

func (*FakeRuntime) CreateContainer

func (r *FakeRuntime) CreateContainer(pid string, cfg *runtimeApi.ContainerConfig, sandboxCfg *runtimeApi.PodSandboxConfig) (string, error)

func (*FakeRuntime) Exec

func (r *FakeRuntime) Exec(id string, cmd []string, tty bool, in io.Reader, out, err io.WriteCloser) error

func (*FakeRuntime) ListContainers

func (r *FakeRuntime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)

func (*FakeRuntime) RemoveContainer

func (r *FakeRuntime) RemoveContainer(id string) error

func (*FakeRuntime) StartContainer

func (r *FakeRuntime) StartContainer(id string) error

func (*FakeRuntime) StopContainer

func (r *FakeRuntime) StopContainer(id string, timeout int64) error

type FakeRuntimeConfig

type FakeRuntimeConfig struct{}

type ImageStore

type ImageStore struct{}

ImageStore supports CRUD operations for images.

func NewImageStore

func NewImageStore(ImageStoreConfig) (*ImageStore, error)

NewImageStore creates an image storage that allows CRUD operations for images.

func (*ImageStore) List

func (*ImageStore) List() ([]runtimeApi.Image, error)

List lists the images residing in the image store.

func (*ImageStore) Pull

Pull pulls an image into the image store and uses the given authentication method.

func (*ImageStore) Remove

Remove removes the image from the image store.

func (*ImageStore) Status

Status returns the status of the image.

type ImageStoreConfig

type ImageStoreConfig struct{}

TODO(tmrts): fill the image store configuration fields.

type PodSandboxManager

type PodSandboxManager struct{}

PodSandboxManager provides basic operations to create/delete and examine the pod sandboxes in a blocking manner.

func (*PodSandboxManager) CreatePodSandbox

func (*PodSandboxManager) CreatePodSandbox(*runtimeApi.PodSandboxConfig) (string, error)

CreatePodSandbox creates a pod sandbox given a pod sandbox configuration.

func (*PodSandboxManager) ListPodSandbox

ListPodSandbox lists existing sandboxes, filtered by the PodSandboxFilter.

func (*PodSandboxManager) PodSandboxStatus

func (*PodSandboxManager) PodSandboxStatus(string) (*runtimeApi.PodSandboxStatus, error)

PodSandboxStatus queries the status of the pod sandbox.

func (*PodSandboxManager) RemovePodSandbox

func (*PodSandboxManager) RemovePodSandbox(string) error

RemovePodSandbox deletes the pod sandbox and the apps inside the sandbox.

func (*PodSandboxManager) StopPodSandbox

func (*PodSandboxManager) StopPodSandbox(string) error

StopPodSandbox stops a pod sandbox and the apps inside the sandbox.

type PodSandboxManagerConfig

type PodSandboxManagerConfig struct{}

TODO(tmrts): Fill the configuration struct fields.

type Runtime

type Runtime struct{}

Runtime provides an API for lifecycle, inspection and introspection operations in a blocking manner using the App level API provided by rkt.

func (*Runtime) ContainerStatus

func (*Runtime) ContainerStatus(string) (*runtimeApi.ContainerStatus, error)

ContainerStatus returns the RawContainerStatus of an app inside the pod sandbox.

func (*Runtime) CreateContainer

CreateContainer creates an app inside the provided pod sandbox and returns the RawContainerID.

func (*Runtime) Exec

Exec executes a command inside an app running inside a pod sanbox.

func (*Runtime) ListContainers

func (*Runtime) ListContainers(*runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)

ListContainers lists out the apps residing inside the pod sandbox using the ContainerFilter.

func (*Runtime) RemoveContainer

func (*Runtime) RemoveContainer(string) error

RemoveContainer removes the app from a pod sandbox.

func (*Runtime) StartContainer

func (*Runtime) StartContainer(string) error

StartContainer starts a created app.

func (*Runtime) StopContainer

func (*Runtime) StopContainer(string, int64) error

StopContainer stops a running app with a grace period (i.e. timeout).

type RuntimeConfig

type RuntimeConfig struct{}

TODO(tmrts): Fill out the creation configuration fields.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL