servicecommon

package
v0.0.0-...-1b7c243 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeAppState

func ChangeAppState(manager ServiceManager, a provision.App, process string, state ProcessState) error

func ChangeUnits

func ChangeUnits(manager ServiceManager, a provision.App, units int, processName string) error

func EnsureNodeContainersCreated

func EnsureNodeContainersCreated(manager NodeContainerManager, w io.Writer) error

func RunServicePipeline

func RunServicePipeline(manager ServiceManager, a provision.App, newImg string, updateSpec ProcessSpec) error

func UpgradeNodeContainer

func UpgradeNodeContainer(manager NodeContainerManager, name, poolToUpgrade string, w io.Writer) error

Types

type NodeContainerManager

type NodeContainerManager interface {
	DeployNodeContainer(conf *nodecontainer.NodeContainerConfig, pool string, filter PoolFilter, placementOnly bool) error
}

type PoolFilter

type PoolFilter struct {
	Include []string
	Exclude []string
}

type ProcessSpec

type ProcessSpec map[string]ProcessState

type ProcessState

type ProcessState struct {
	Stop      bool
	Start     bool
	Restart   bool
	Sleep     bool
	Increment int
}

type ServiceManager

type ServiceManager interface {
	RemoveService(a provision.App, processName string) error
	CurrentLabels(a provision.App, processName string) (*provision.LabelSet, error)
	DeployService(a provision.App, processName string, labels *provision.LabelSet, replicas int, image string) error
}

Jump to

Keyboard shortcuts

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