script

package
v2.900.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, scriptEnv map[string]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,
	env map[string]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, scriptEnv map[string]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