servicecommon

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 16 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 RebuildRoutesPoolApps

func RebuildRoutesPoolApps(pool string)

func RunServicePipeline

func RunServicePipeline(manager ServiceManager, a provision.App, newImg string, updateSpec ProcessSpec, evt *event.Event) 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(ctx context.Context, 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