rktshim

package
v1.6.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2017 License: Apache-2.0 Imports: 8 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

View Source
const (
	FakeStreamingHost = "localhost"
	FakeStreamingPort = "12345"
)

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) Attach added in v1.5.0

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 (*FakeRuntime) ExecSync added in v1.5.0

func (r *FakeRuntime) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err 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) 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) PortForward added in v1.5.0

PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.

func (*PodSandboxManager) RemovePodSandbox

func (*PodSandboxManager) RemovePodSandbox(string) error

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

func (*PodSandboxManager) RunPodSandbox added in v1.5.0

RunPodSandbox creates and starts a pod sandbox given a pod sandbox configuration.

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) Attach added in v1.5.0

Attach prepares a streaming endpoint to attach to a running container, and returns the address.

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 prepares a streaming endpoint to execute a command in the container, and returns the address.

func (*Runtime) ExecSync added in v1.5.0

func (*Runtime) 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 (*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