runtime

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUFFER_SIZE = 1024
)
View Source
const MinContainerMemory = 32

Variables

This section is empty.

Functions

func ConfigCreate

func ConfigCreate(ctx context.Context, name string, cfg *types.ConfigManifest) error

func ConfigManage

func ConfigManage(ctx context.Context, name string, cfg *types.ConfigManifest) error

func ConfigRemove

func ConfigRemove(ctx context.Context, name string)

func ConfigUpdate

func ConfigUpdate(ctx context.Context, name string, cfg *types.ConfigManifest) error

func ImagePull

func ImagePull(ctx context.Context, namespace string, image *types.SpecTemplateContainerImage) error

func ImageRemove

func ImageRemove(ctx context.Context, link string) error

func ImageRestore

func ImageRestore(ctx context.Context) error

func NodeAllocation

func NodeAllocation() types.NodeResources

func NodeCapacity

func NodeCapacity() types.NodeResources

func NodeInfo

func NodeInfo() types.NodeInfo

func NodeStatus

func NodeStatus() types.NodeStatus

func PodClean

func PodClean(ctx context.Context, status *types.PodStatus)

func PodCreate

func PodCreate(ctx context.Context, key string, manifest *types.PodManifest) (*types.PodStatus, error)

func PodDestroy

func PodDestroy(ctx context.Context, pod string, status *types.PodStatus)

func PodLogs

func PodLogs(ctx context.Context, id string, follow bool, s io.Writer, doneChan chan bool) error

func PodManage

func PodManage(ctx context.Context, key string, manifest *types.PodManifest) error

func PodRestart

func PodRestart(ctx context.Context, key string) error

func PodRestore

func PodRestore(ctx context.Context) error

func PodSpecCheck

func PodSpecCheck(ctx context.Context, key string, manifest *types.PodManifest) bool

func PodVolumeAttach

func PodVolumeAttach(ctx context.Context, pod string, spec *types.SpecTemplateVolume) (*types.VolumeClaim, error)

func PodVolumeCreate

func PodVolumeCreate(ctx context.Context, pod string, spec *types.SpecTemplateVolume) (*types.VolumeStatus, error)

func PodVolumeDestroy

func PodVolumeDestroy(ctx context.Context, pod, volume string) error

func PodVolumeUpdate

func PodVolumeUpdate(ctx context.Context, pod string, spec *types.SpecTemplateVolume) (*types.VolumeStatus, error)

func PodVolumesCheck

func PodVolumesCheck(ctx context.Context, pod string, spec []*types.SpecTemplateVolume) bool

func SecretCreate

func SecretCreate(ctx context.Context, selflink string) error

func SecretGet

func SecretGet(ctx context.Context, selflink string) (*types.Secret, error)

func SecretRemove

func SecretRemove(ctx context.Context, selflink string)

func SecretUpdate

func SecretUpdate(ctx context.Context, selflink string) error

func VolumeCheckConfigData

func VolumeCheckConfigData(ctx context.Context, name string, config string) (bool, error)

func VolumeCheckSecretData

func VolumeCheckSecretData(ctx context.Context, name string, secret string) (bool, error)

func VolumeCreate

func VolumeCreate(ctx context.Context, name string, mf *types.VolumeManifest) (*types.VolumeStatus, error)

func VolumeDestroy

func VolumeDestroy(ctx context.Context, name string) error

func VolumeManage

func VolumeManage(ctx context.Context, key string, manifest *types.VolumeManifest) error

func VolumeRestore

func VolumeRestore(ctx context.Context) error

func VolumeSetConfigData

func VolumeSetConfigData(ctx context.Context, name string, config string) error

func VolumeSetSecretData

func VolumeSetSecretData(ctx context.Context, name string, secret string) error

Types

type Runtime

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

Runtime main node process

func NewRuntime

func NewRuntime() (*Runtime, error)

NewRuntime method return new runtime pointer

func (*Runtime) Loop

func (r *Runtime) Loop(ctx context.Context)

Loop runtime method defines single runtime loop

func (*Runtime) Provision

func (r *Runtime) Provision(ctx context.Context, dir string) error

Provision node manifest

func (*Runtime) Restore

func (r *Runtime) Restore(ctx context.Context) error

Restore node runtime state

func (*Runtime) Subscribe

func (r *Runtime) Subscribe(ctx context.Context)

Subscribe runtime for container events

func (*Runtime) Sync

func (r *Runtime) Sync(ctx context.Context, spec *types.NodeManifest) error

Sync node runtime with new spec

Jump to

Keyboard shortcuts

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