rktshim

package
v1.5.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2016 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