hyper

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HYPER_PROTO       = "unix"
	HYPER_ADDR        = "/var/run/hyper.sock"
	HYPER_SCHEME      = "http"
	HYPER_SERVER      = "127.0.0.1:22318"
	DEFAULT_IMAGE_TAG = "latest"

	KEY_COMMAND        = "command"
	KEY_CONTAINER_PORT = "containerPort"
	KEY_CONTAINERS     = "containers"
	KEY_DNS            = "dns"
	KEY_ENTRYPOINT     = "entrypoint"
	KEY_ENVS           = "envs"
	KEY_HOST_PORT      = "hostPort"
	KEY_HOSTNAME       = "hostname"
	KEY_ID             = "id"
	KEY_IMAGE          = "image"
	KEY_IMAGEID        = "imageId"
	KEY_IMAGENAME      = "imageName"
	KEY_ITEM           = "item"
	KEY_LABELS         = "labels"
	KEY_MEMORY         = "memory"
	KEY_MOUNTPATH      = "path"
	KEY_NAME           = "name"
	KEY_POD_ID         = "podId"
	KEY_POD_NAME       = "podName"
	KEY_PORTS          = "ports"
	KEY_PROTOCOL       = "protocol"
	KEY_READONLY       = "readOnly"
	KEY_RESOURCE       = "resource"
	KEY_TAG            = "tag"
	KEY_TTY            = "tty"
	KEY_TYPE           = "type"
	KEY_VALUE          = "value"
	KEY_VCPU           = "vcpu"
	KEY_VOLUME         = "volume"
	KEY_VOLUME_DRIVE   = "driver"
	KEY_VOLUME_SOURCE  = "source"
	KEY_VOLUMES        = "volumes"
	KEY_WORKDIR        = "workdir"

	KEY_API_POD_UID = "k8s.hyper.sh/uid"

	TYPE_CONTAINER = "container"
	TYPE_POD       = "pod"

	VOLUME_TYPE_VFS = "vfs"
)
View Source
const (
	StatusRunning = "running"
	StatusPending = "pending"
	StatusFailed  = "failed"
	StatusSuccess = "succeeded"
)

Variables

This section is empty.

Functions

func LogSymlink(containerLogsDir, podFullName, containerName, containerID string) string

LogSymlink generates symlink file path for specified container

func New

func New(runtimeHelper kubecontainer.RuntimeHelper,
	recorder record.EventRecorder,
	networkPlugin network.NetworkPlugin,
	containerRefManager *kubecontainer.RefManager,
	livenessManager proberesults.Manager,
	kubeClient clientset.Interface,
	imageBackOff *flowcontrol.Backoff,
	serializeImagePulls bool,
	httpClient kubetypes.HttpGetter,
	disableHyperInternalService bool,
	containerLogsDir string,
	os kubecontainer.OSInterface,
) (kubecontainer.Runtime, error)

New creates the hyper container runtime which implements the container runtime interface.

Types

type AttachToContainerOptions

type AttachToContainerOptions struct {
	Container    string
	InputStream  io.Reader
	OutputStream io.Writer
	ErrorStream  io.Writer
	TTY          bool
}

type ContainerLogsOptions added in v0.3.0

type ContainerLogsOptions struct {
	Container    string
	OutputStream io.Writer
	ErrorStream  io.Writer

	Follow     bool
	Since      int64
	Timestamps bool
	TailLines  int64
}

type ExecInContainerOptions added in v0.3.0

type ExecInContainerOptions struct {
	Container    string
	InputStream  io.Reader
	OutputStream io.Writer
	ErrorStream  io.Writer
	Commands     []string
	TTY          bool
}

type HyperClient

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

func NewHyperClient

func NewHyperClient() (*HyperClient, error)

func (*HyperClient) Attach

func (c *HyperClient) Attach(opts AttachToContainerOptions) error

func (*HyperClient) ContainerLogs added in v0.3.0

func (c *HyperClient) ContainerLogs(opts ContainerLogsOptions) error

func (*HyperClient) CreatePod

func (c *HyperClient) CreatePod(podSpec *grpctypes.UserPod) (string, error)

func (*HyperClient) Exec added in v0.3.0

func (*HyperClient) GetPodIDByName added in v0.3.0

func (c *HyperClient) GetPodIDByName(podName string) (string, error)

func (*HyperClient) Info

func (c *HyperClient) Info() (*grpctypes.InfoResponse, error)

func (*HyperClient) IsImagePresent

func (client *HyperClient) IsImagePresent(repo, tag string) (bool, error)

func (*HyperClient) ListContainers

func (c *HyperClient) ListContainers() ([]HyperContainer, error)

func (*HyperClient) ListImages

func (c *HyperClient) ListImages() ([]HyperImage, error)

func (*HyperClient) ListPods

func (c *HyperClient) ListPods() ([]HyperPod, error)

func (*HyperClient) ListServices

func (c *HyperClient) ListServices(podId string) ([]*grpctypes.UserService, error)

func (*HyperClient) PullImage

func (c *HyperClient) PullImage(image string, credential string) error

func (*HyperClient) RemoveImage

func (c *HyperClient) RemoveImage(imageID string) error

func (*HyperClient) RemovePod

func (c *HyperClient) RemovePod(podID string) error

func (*HyperClient) StartPod

func (c *HyperClient) StartPod(podID string) error

func (*HyperClient) StopPod

func (c *HyperClient) StopPod(podID string) error

func (*HyperClient) UpdatePodLabels added in v0.3.0

func (c *HyperClient) UpdatePodLabels(podId string, labels map[string]string) error

func (*HyperClient) UpdateServices

func (c *HyperClient) UpdateServices(podId string, services []*grpctypes.UserService) error

func (*HyperClient) Version

func (c *HyperClient) Version() (string, error)

type HyperContainer

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

type HyperImage

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

type HyperPod

type HyperPod struct {
	PodID   string
	PodName string
	VmName  string
	Status  string
	PodInfo *grpctypes.PodInfo
}

Directories

Path Synopsis
Package types is a generated protocol buffer package.
Package types is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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