Documentation ¶
Index ¶
- func DetermineStageStatus(sig StopSignalType, ori, got model.StageStatus) model.StageStatus
- func NewStopSignal() (StopSignal, StopSignalHandler)
- type AnalysisResultStore
- type AppLiveResourceLister
- type CommandLister
- type Executor
- type Factory
- type GitClient
- type Input
- type LogPersister
- type Notifier
- type StopSignal
- type StopSignalHandler
- type StopSignalType
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 AnalysisResultStore ¶
type AnalysisResultStore interface { GetLatestAnalysisResult(ctx context.Context) (*model.AnalysisResult, error) PutLatestAnalysisResult(ctx context.Context, analysisResult *model.AnalysisResult) error }
type AppLiveResourceLister ¶
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 Application *model.Application PipedConfig *config.PipedSpec // Deploy source at target commit TargetDSP deploysource.Provider // Deploy source at running commit RunningDSP deploysource.Provider GitClient GitClient CommandLister CommandLister LogPersister LogPersister MetadataStore metadatastore.MetadataStore AppManifestsCache cache.Cache AppLiveResourceLister AppLiveResourceLister AnalysisResultStore AnalysisResultStore Logger *zap.Logger Notifier Notifier }
type LogPersister ¶
type Notifier ¶
type Notifier interface {
Notify(event model.NotificationEvent)
}
type StopSignal ¶
type StopSignal interface { Context() context.Context Ch() <-chan StopSignalType Signal() StopSignalType Terminated() 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.