Documentation ¶
Index ¶
- func Replay(events []ddd.Event) ddd.Aggregate
- type AppendLog
- type Completed
- type Created
- type Engine
- type Log
- type LogLevel
- type ReadRepository
- type Run
- func (r *Run) AppendLog(message string, level LogLevel, timestamp int64) error
- func (r *Run) Apps() []template.App
- func (r *Run) Complete(status Status, timestamp int64) error
- func (r *Run) CompleteStep(status Status, 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) RunVersion() string
- 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 Step
- type StepCompleted
- type StepSkipped
- type StepStarted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Created ¶
type Created struct { UUID string DeploymentUUID string Template *template.Template Trigger *trigger.Trigger }
Created is the event for when a new run is started
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
The Engine is the worker that performs all run steps and tracking
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) 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" // 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 StepCompleted ¶
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