Documentation ¶
Index ¶
- Constants
- Variables
- func NewBackground(substep ifrit.Runner, logger lager.Logger) ifrit.Runner
- func NewCodependent(substeps []ifrit.Runner, errorOnExit bool, cancelOthersOnExit bool) ifrit.Runner
- func NewConsistentlySucceedsStep(create func() ifrit.Runner, frequency time.Duration, clock clock.Clock) ifrit.Runner
- func NewDownload(container garden.Container, model models.DownloadAction, ...) ifrit.Runner
- func NewEmitProgress(substep ifrit.Runner, startMessage, successMessage, failureMessage string, ...) *emitProgressStep
- func NewEventuallySucceedsStep(create func() ifrit.Runner, frequency, timeout time.Duration, ...) ifrit.Runner
- func NewHealthCheckStep(startupCheck ifrit.Runner, livenessCheck ifrit.Runner, logger lager.Logger, ...) ifrit.Runner
- func NewMonitor(checkFunc func() ifrit.Runner, logger lager.Logger, clock clock.Clock, ...) ifrit.Runner
- func NewOutputWrapper(substep ifrit.Runner, reader io.Reader) ifrit.Runner
- func NewOutputWrapperWithPrefix(substep ifrit.Runner, reader io.Reader, prefix string) ifrit.Runner
- func NewParallel(substeps []ifrit.Runner) *parallelStep
- func NewReadinessHealthCheckStep(untilReadyCheck ifrit.Runner, untilFailureCheck ifrit.Runner, ...) ifrit.Runner
- func NewRun(container garden.Container, model models.RunAction, ...) *runStep
- func NewRunWithSidecar(container garden.Container, model models.RunAction, ...) *runStep
- func NewSerial(steps []ifrit.Runner) ifrit.Runner
- func NewThrottle(substep ifrit.Runner, workPool *workpool.WorkPool) *throttleStep
- func NewTimedStep(logger lager.Logger, step ifrit.Runner, ...) ifrit.Runner
- func NewTimeout(substep ifrit.Runner, timeout time.Duration, clock clock.Clock, ...) ifrit.Runner
- func NewTry(substep ifrit.Runner, logger lager.Logger) ifrit.Runner
- func NewUpload(container garden.Container, model models.UploadAction, ...) ifrit.Runner
- type CancelledError
- type EmittableError
- type ExceededGracefulShutdownIntervalError
- type ExitTimeoutError
- type IsDisplayableError
- type ReadSizer
- type ReadinessState
- type Sidecar
Constants ¶
View Source
const ( ContainerSetupSucceededDuration = "ContainerSetupSucceededDuration" ContainerSetupFailedDuration = "ContainerSetupFailedDuration" )
View Source
const ( ErrCreateTmpDir = "Failed to create temp dir" ErrEstablishStream = "Failed to establish stream from container" ErrReadTar = "Failed to find first item in tar stream" ErrCreateTmpFile = "Failed to create temp file" ErrCopyStreamToTmp = "Failed to copy stream contents into temp file" ErrParsingURL = "Failed to parse URL" )
View Source
const ExitTimeout = 1 * time.Second
Variables ¶
View Source
var CodependentStepExitedError = errors.New("Codependent step exited")
Functions ¶
func NewBackground ¶ added in v0.1442.0
func NewCodependent ¶
func NewConsistentlySucceedsStep ¶ added in v0.1442.0
func NewConsistentlySucceedsStep(create func() ifrit.Runner, frequency time.Duration, clock clock.Clock) ifrit.Runner
TODO: use a workpool when running the substep
func NewDownload ¶
func NewDownload( container garden.Container, model models.DownloadAction, cachedDownloader cacheddownloader.CachedDownloader, rateLimiter chan struct{}, streamer log_streamer.LogStreamer, logger lager.Logger, ) ifrit.Runner
func NewEmitProgress ¶
func NewEmitProgress( substep ifrit.Runner, startMessage, successMessage, failureMessage string, streamer log_streamer.LogStreamer, logger lager.Logger, ) *emitProgressStep
func NewEventuallySucceedsStep ¶ added in v0.1442.0
func NewEventuallySucceedsStep(create func() ifrit.Runner, frequency, timeout time.Duration, clock clock.Clock) ifrit.Runner
TODO: use a workpool when running the substep
func NewHealthCheckStep ¶ added in v0.1442.0
func NewHealthCheckStep( startupCheck ifrit.Runner, livenessCheck ifrit.Runner, logger lager.Logger, clock clock.Clock, logStreamer log_streamer.LogStreamer, healthcheckStreamer log_streamer.LogStreamer, startTimeout time.Duration, ) ifrit.Runner
func NewMonitor ¶
func NewOutputWrapper ¶ added in v0.1442.0
This step ignores the error from the substep and returns the content of Reader as an emittable error. This is used to wrap the output of the healthcheck as the error instead of using the exit status or the process
func NewOutputWrapperWithPrefix ¶ added in v0.1442.0
func NewParallel ¶
func NewReadinessHealthCheckStep ¶ added in v0.1442.0
func NewReadinessHealthCheckStep( untilReadyCheck ifrit.Runner, untilFailureCheck ifrit.Runner, logStreamer log_streamer.LogStreamer, readinessChan chan ReadinessState, logger lager.Logger, ) ifrit.Runner
func NewRun ¶
func NewRun( container garden.Container, model models.RunAction, streamer log_streamer.LogStreamer, logger lager.Logger, externalIP string, internalIP string, portMappings []executor.PortMapping, clock clock.Clock, gracefulShutdownInterval time.Duration, suppressExitStatusCode bool, ) *runStep
func NewRunWithSidecar ¶ added in v0.1442.0
func NewRunWithSidecar( container garden.Container, model models.RunAction, streamer log_streamer.LogStreamer, logger lager.Logger, externalIP string, internalIP string, portMappings []executor.PortMapping, clock clock.Clock, gracefulShutdownInterval time.Duration, suppressExitStatusCode bool, sidecar Sidecar, privileged bool, ) *runStep
func NewThrottle ¶ added in v0.1442.0
func NewTimedStep ¶ added in v0.1442.0
func NewTimedStep(logger lager.Logger, step ifrit.Runner, metronClient loggingclient.IngressClient, clock clock.Clock, startTime time.Time) ifrit.Runner
func NewTimeout ¶
func NewUpload ¶
func NewUpload( container garden.Container, model models.UploadAction, uploader uploader.Uploader, compressor compressor.Compressor, tempDir string, streamer log_streamer.LogStreamer, rateLimiter chan struct{}, logger lager.Logger, ) ifrit.Runner
Types ¶
type CancelledError ¶ added in v0.1442.0
type CancelledError struct{}
func (*CancelledError) Error ¶ added in v0.1442.0
func (e *CancelledError) Error() string
func (*CancelledError) IsDisplayable ¶ added in v0.1442.0
func (e *CancelledError) IsDisplayable() bool
type EmittableError ¶
type EmittableError struct {
// contains filtered or unexported fields
}
func NewEmittableError ¶
func NewEmittableError(wrappedError error, message string, args ...interface{}) *EmittableError
func (*EmittableError) Error ¶
func (e *EmittableError) Error() string
func (*EmittableError) WrappedError ¶
func (e *EmittableError) WrappedError() error
type ExceededGracefulShutdownIntervalError ¶ added in v0.1442.0
type ExceededGracefulShutdownIntervalError struct{}
func (*ExceededGracefulShutdownIntervalError) Error ¶ added in v0.1442.0
func (e *ExceededGracefulShutdownIntervalError) Error() string
func (*ExceededGracefulShutdownIntervalError) IsDisplayable ¶ added in v0.1442.0
func (e *ExceededGracefulShutdownIntervalError) IsDisplayable() bool
type ExitTimeoutError ¶ added in v0.1442.0
type ExitTimeoutError struct{}
func (*ExitTimeoutError) Error ¶ added in v0.1442.0
func (e *ExitTimeoutError) Error() string
type IsDisplayableError ¶ added in v0.1442.0
type IsDisplayableError interface {
IsDisplayable() bool
}
type ReadinessState ¶ added in v0.1442.0
type ReadinessState int
const ( IsReady ReadinessState = iota IsNotReady )
Source Files ¶
- background_step.go
- codependent_step.go
- consistently_succeeds_step.go
- download_step.go
- emit_progress_step.go
- emittable_error.go
- errors.go
- eventually_succeeds_step.go
- health_check_step.go
- monitor_step.go
- output_wrapper_step.go
- package.go
- parallel_step.go
- readiness_health_check_step.go
- run_step.go
- serial_step.go
- throttle_step.go
- timed_step.go
- timeout_step.go
- try_step.go
- upload_step.go
Click to show internal directories.
Click to hide internal directories.