cluster

package
v0.0.0-...-9b5a650 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calcium

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

func NewCalcum

func NewCalcum(config *types.Config) (*Calcium, error)

func (*Calcium) AddNode

func (c *Calcium) AddNode(nodename, endpoint, podname string, public bool) (*types.Node, error)

func (*Calcium) AddPod

func (c *Calcium) AddPod(podname, desc string) (*types.Pod, error)

func (*Calcium) BuildImage

func (c *Calcium) BuildImage(repository, version, uid string) (chan *types.BuildImageMessage, error)

build image for repository since we wanna set UID for the user inside container, we have to know the uid parameter

build directory is like:

buildDir ├─ :appname ├─ code
         ├─ Dockerfile
         ├─ launcher
         ├─ launcheroot

func (*Calcium) GetContainer

func (c *Calcium) GetContainer(id string) (*types.Container, error)

func (*Calcium) GetNode

func (c *Calcium) GetNode(podname, nodename string) (*types.Node, error)

func (*Calcium) GetPod

func (c *Calcium) GetPod(podname string) (*types.Pod, error)

func (*Calcium) ListPodNodes

func (c *Calcium) ListPodNodes(podname string) ([]*types.Node, error)

func (*Calcium) ListPods

func (c *Calcium) ListPods() ([]*types.Pod, error)

func (*Calcium) RemoveContainer

func (c *Calcium) RemoveContainer(ids []string) (chan *types.RemoveContainerMessage, error)

remove containers returns a channel that contains removing responses

func (*Calcium) RemoveImage

func (c *Calcium) RemoveImage(nodename string, images []string) (chan *types.RemoveImageMessage, error)

remove images

type Cluster

type Cluster interface {
	// meta data methods
	ListPods() ([]*types.Pod, error)
	AddPod(podname, desc string) (*types.Pod, error)
	GetPod(podname string) (*types.Pod, error)
	AddNode(nodename, endpoint, podname string, public bool) (*types.Node, error)
	GetNode(podname, nodename string) (*types.Node, error)
	ListPodNodes(podname string) ([]*types.Node, error)
	GetContainer(id string) (*types.Container, error)
	GetContainers(ids []string) ([]*types.Container, error)

	// cluster methods
	BuildImage(repository, version string) (chan *types.BuildImageMessage, error)
	CreateContainer() error
	UpdateContainer() error
	RemoveContainer(ids []string) (chan *types.RemoveContainerMessage, error)
	MigrateContainer() error
	RemoveImage(nodename string, images []string) (chan *types.RemoveImageMessage, error)
}

Jump to

Keyboard shortcuts

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