Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineStageStatus ¶
func DetermineStageStatus(sig StopSignalType, ori, got model.StageStatus) model.StageStatus
func NewStopSignal ¶
func NewStopSignal() (StopSignal, StopSignalHandler)
Types ¶
type CommandLister ¶
type CommandLister interface {
ListCommands() []model.ReportableCommand
}
type Executor ¶
type Executor interface {
// Execute starts running executor until completion
// or the StopSignal has emitted.
Execute(sig StopSignal) model.StageStatus
}
type Input ¶
type Input struct {
Stage *model.PipelineStage
StageConfig config.PipelineStage
// Readonly deployment model.
Deployment *model.Deployment
DeploymentConfig *config.Config
PipedConfig *config.PipedSpec
Application *model.Application
WorkingDir string
// The path to the directory containing repository's source code at target commit.
RepoDir string
// The path to the directory containing repository's source code at running commit.
// This directory is valid only when the Deployment.RunningCommitHash is not empty.
RunningRepoDir string
StageWorkingDir string
CommandLister CommandLister
LogPersister LogPersister
MetadataStore MetadataStore
AppManifestsCache cache.Cache
Logger *zap.Logger
}
type LogPersister ¶
type MetadataStore ¶
type StopSignal ¶
type StopSignal interface {
Context() context.Context
Ch() <-chan StopSignalType
Signal() StopSignalType
Stopped() bool
}
type StopSignalHandler ¶
type StopSignalHandler interface {
Cancel()
Timeout()
Terminate()
}
type StopSignalType ¶
type StopSignalType string
const ( // StopSignalTerminate means the executor should stop its execution // because the program was asked to terminate. StopSignalTerminate StopSignalType = "terminate" // StopSignalCancel means the executor should stop its execution // because the deployment was cancelled. StopSignalCancel StopSignalType = "cancel" // StopSignalTimeout means the executor should stop its execution // because of timeout. StopSignalTimeout StopSignalType = "timeout" // StopSignalNone means the excutor can be continuously executed. StopSignalNone StopSignalType = "none" )
Click to show internal directories.
Click to hide internal directories.