Documentation ¶
Index ¶
- func Replay(events []ddd.Event) ddd.Aggregate
- type AppendLog
- type Completed
- type Created
- type Engine
- type Link
- type Log
- type LogLevel
- type ReadRepository
- type Run
- func (r *Run) AppendLog(message string, level LogLevel, timestamp int64) error
- func (r *Run) Complete(status Status, timestamp int64) error
- func (r *Run) CompleteStep(timestamp int64) error
- func (r *Run) CurrentTemplate() *template.Step
- func (r *Run) DeploymentUUID() string
- func (r *Run) Destroyed() bool
- func (r *Run) Events() []ddd.Event
- func (r *Run) Links() []*Link
- func (r *Run) Name() string
- func (r *Run) Paused() bool
- func (r *Run) RunVersion() string
- func (r *Run) SetStatus(s Status) error
- func (r *Run) SkipStep(name, reason string, timestamp int64) error
- func (r *Run) Start(timestamp int64) error
- func (r *Run) StartStep(name string, timestamp int64) error
- func (r *Run) StartTime() int64
- func (r *Run) Status() Status
- func (r *Run) Steps() []Step
- func (r *Run) StopTime() int64
- func (r *Run) UUID() string
- func (r *Run) Version() int
- type RuntimeError
- type Started
- type Status
- type StatusSet
- type Step
- type StepCompleted
- type StepSkipped
- type StepStarted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
The Engine is the worker that performs all run steps and tracking
func NewEngine ¶
func NewEngine(r *Run, s storage.Storage, aa agent.AgentAction, g git.Agent, ra repo.Agent, ap func(string, string, bool) error, t func(string, string, []byte) (string, error)) (*Engine, error)
NewEngine initializes the engine with required dependencies
type LogLevel ¶
type LogLevel string
LogLevel is an alias for different log levels for run messages NOTE: this is not for internal logging, but rather how we represent deployment logs
const ( // Debug represents a log level not normally shown, for debug purposes Debug LogLevel = "DEBUG" // Info represents informational logs Info LogLevel = "INFO" // Warn represents warning logs for conditions not normally seen, but which aren't errors Warn LogLevel = "WARN" // Error represents the log for an error Error LogLevel = "ERROR" )
type ReadRepository ¶
type ReadRepository struct {
// contains filtered or unexported fields
}
ReadRepository is the repository for dealing with run reads
func NewReadRepository ¶
func NewReadRepository(s storage.Storage) *ReadRepository
NewReadRepository creates a repository with the given storage
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run represents a single execution of a deployment
func (*Run) CompleteStep ¶
CompleteStep completes the currently running step
func (*Run) CurrentTemplate ¶
CurrentTemplate gets the current step to execute
func (*Run) DeploymentUUID ¶
DeploymentUUID gets the run's deployment uuid
func (*Run) Paused ¶ added in v0.8.0
Paused returns if this run has been paused for some reason, for example a manual approval
func (*Run) RunVersion ¶
RunVersion gets the version specified in the template for the run (NOTE: not the entity version)
type RuntimeError ¶
type RuntimeError struct {
// contains filtered or unexported fields
}
RuntimeError is thrown when some runtime execution rule is broken
func (RuntimeError) Error ¶
func (e RuntimeError) Error() string
type Status ¶
type Status string
Status is an alias to give us the status of a Step
const ( // NotStarted signifies a step not yet executed NotStarted Status = "NotStarted" // InProgress signifies a step that has been started InProgress Status = "InProgress" // AwaitingApproval signifies a step that is awaiting a manual approver AwaitingApproval Status = "AwaitingApproval" // Failed signifies a step that failed Failed Status = "Failed" // Succeeded signifies a step that was successful Succeeded Status = "Succeeded" // Skipped signifies a step that was not run Skipped Status = "Skipped" )
type StatusSet ¶ added in v0.8.0
type StatusSet struct {
Status Status
}
StatusSet is the event for when a step's status changes
type StepCompleted ¶
type StepCompleted struct {
Timestamp int64
}
StepCompleted is the event for when a particular step is completed
func (StepCompleted) EventType ¶
func (e StepCompleted) EventType() string
EventType marks this as an event
type StepSkipped ¶
StepSkipped is the event for when a particular step is skipped
func (StepSkipped) EventType ¶
func (e StepSkipped) EventType() string
EventType marks this as an event
type StepStarted ¶
StepStarted is the event for when a particular step is started
func (StepStarted) EventType ¶
func (e StepStarted) EventType() string
EventType marks this as an event