worker

package
v0.0.0-...-86474c0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerdAddr  = "/run/containerd/containerd.sock"
	HuangNS         = "huang"
	DeploymentLabel = "deploy"
	SyncDuration    = 3
)

Variables

This section is empty.

Functions

func Main

func Main(c *cli.Context) error

Types

type DeploymentMap

type DeploymentMap map[string][]containerd.Container

type Worker

type Worker struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Worker) Delete

func (w *Worker) Delete(ctx context.Context, deploy *deployment.Deployment) error

func (*Worker) Deploy

func (w *Worker) Deploy(ctx context.Context, deploy *deployment.Deployment, imagePath string, replica int) ([]containerd.Container, error)

Deploy deploy a deployment

func (*Worker) SyncLocalContainerInfos

func (w *Worker) SyncLocalContainerInfos(ctx context.Context)

SyncLocalContainerInfos sync local container infomation

Jump to

Keyboard shortcuts

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