script

package
v2.150.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ScriptExt = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type CancellableScript

type CancellableScript interface {
	Script
	Cancel() error
}

type ConcreteJobScriptProvider

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

func NewConcreteJobScriptProvider

func NewConcreteJobScriptProvider(
	cmdRunner boshsys.CmdRunner,
	fs boshsys.FileSystem,
	dirProvider boshdir.Provider,
	timeService clock.Clock,
	logger boshlog.Logger,
) ConcreteJobScriptProvider

func (ConcreteJobScriptProvider) NewDrainScript

func (p ConcreteJobScriptProvider) NewDrainScript(jobName string, params boshdrain.ScriptParams) CancellableScript

func (ConcreteJobScriptProvider) NewParallelScript

func (p ConcreteJobScriptProvider) NewParallelScript(scriptName string, scripts []Script) CancellableScript

func (ConcreteJobScriptProvider) NewScript

func (p ConcreteJobScriptProvider) NewScript(jobName string, scriptName string) Script

type GenericScript

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

func NewScript

func NewScript(
	fs boshsys.FileSystem,
	runner boshsys.CmdRunner,
	tag string,
	path string,
	stdoutLogPath string,
	stderrLogPath string,
) GenericScript

func (GenericScript) Exists

func (s GenericScript) Exists() bool

func (GenericScript) Path

func (s GenericScript) Path() string

func (GenericScript) Run

func (s GenericScript) Run() error

func (GenericScript) Tag

func (s GenericScript) Tag() string

type JobScriptProvider

type JobScriptProvider interface {
	NewScript(jobName string, scriptName string) Script
	NewDrainScript(jobName string, params boshdrain.ScriptParams) CancellableScript
	NewParallelScript(scriptName string, scripts []Script) CancellableScript
}

type ParallelScript

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

func NewParallelScript

func NewParallelScript(name string, scripts []Script, logger boshlog.Logger) ParallelScript

func (ParallelScript) Cancel

func (s ParallelScript) Cancel() error

func (ParallelScript) Exists

func (s ParallelScript) Exists() bool

func (ParallelScript) Path

func (s ParallelScript) Path() string

func (ParallelScript) Run

func (s ParallelScript) Run() error

func (ParallelScript) Tag

func (s ParallelScript) Tag() string

type Script

type Script interface {
	Tag() string
	Path() string

	Exists() bool
	Run() error
}

Directories

Path Synopsis
drainfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Package pathenv returns the OS specific PATH environment variable to use when shelling out to user scripts (e.g pre-start, drain).
Package pathenv returns the OS specific PATH environment variable to use when shelling out to user scripts (e.g pre-start, drain).
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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