maker

package
v0.0.0-...-e2f5efa Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVolumeOrder

func CreateVolumeOrder(name string, global bool) command.Order

func FileOrder

func FileOrder(name string, input schema.InputFile) command.Order

func MkdirOrder

func MkdirOrder(name string) command.Order

Types

type Command

type Command interface {
	CreateNetwork(name string, network entity.Network) command.Order
	CreateVolume(volume schema.Volume, global bool) command.Order
	CreateContainer(state *entity.State, service entity.Service, cpuBindings []int) command.Order
	CreateSidecarNetwork(service entity.Service, network entity.Network) command.Order
	StartContainer(service entity.Service, isTask bool, timeout command.Timeout) command.Order

	CreateSidecar(state *entity.State, parent entity.Service, sidecar schema.Sidecar, cpuBindings []int) command.Order
	StartSidecar(parent entity.Service, sidecar schema.Sidecar) command.Order
	PullImage(image string) command.Order
	File(name string, input schema.InputFile) command.Order
	AttachNetwork(service string, network string, ip string) command.Order
	DetachNetwork(service string, network string) command.Order
	Emulation(serviceName string, network schema.Network) (command.Order, error)

	RemoveContainer(name string) command.Order

	Mkdir(name string) command.Order

	Service() parser.Service
	Sidecar() parser.Sidecar
}

Command handles the simple schema -> order conversions

func NewCommand

func NewCommand(
	service parser.Service,
	sidecar parser.Sidecar) Command

type Service

type Service interface {
	FromSystemDiff(spec schema.RootSchema, system schema.SystemComponent,
		merged schema.SystemComponent) (*entity.SystemDiff, error)

	FromSystem(spec schema.RootSchema, system schema.SystemComponent) ([]entity.Service, error)
	FromTask(spec schema.RootSchema, task schema.Task, index int) (entity.Service, error)
}

func NewService

func NewService(
	conf config.Config,
	log logrus.Ext1FieldLogger) Service

Jump to

Keyboard shortcuts

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