drain

package
v0.0.0-...-3fc8308 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShutdownParams

func NewShutdownParams(
	oldSpec boshas.V1ApplySpec,
	newSpec *boshas.V1ApplySpec,
) staticParams

func NewStatusParams

func NewStatusParams(
	oldSpec boshas.V1ApplySpec,
	newSpec *boshas.V1ApplySpec,
) staticParams

func NewUpdateParams

func NewUpdateParams(oldSpec, newSpec boshas.V1ApplySpec) updateParams

Types

type ConcreteScript

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

func NewConcreteScript

func NewConcreteScript(
	fs boshsys.FileSystem,
	runner boshsys.CmdRunner,
	drainScriptPath string,
) (script ConcreteScript)

func (ConcreteScript) Exists

func (script ConcreteScript) Exists() bool

func (ConcreteScript) Path

func (script ConcreteScript) Path() string

func (ConcreteScript) Run

func (script ConcreteScript) Run(params ScriptParams) (int, error)

type ConcreteScriptProvider

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

func NewConcreteScriptProvider

func NewConcreteScriptProvider(
	cmdRunner boshsys.CmdRunner,
	fs boshsys.FileSystem,
	dirProvider boshdirs.Provider,
) (provider ConcreteScriptProvider)

func (ConcreteScriptProvider) NewScript

func (p ConcreteScriptProvider) NewScript(templateName string) Script

type Script

type Script interface {
	Exists() bool
	Run(params ScriptParams) (value int, err error)
	Path() string
}

type ScriptParams

type ScriptParams interface {
	JobChange() (change string)
	HashChange() (change string)
	UpdatedPackages() (pkgs []string)

	JobState() (string, error)
	JobNextState() (string, error)
}

type ScriptProvider

type ScriptProvider interface {
	NewScript(templateName string) (drainScript Script)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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