Documentation
¶
Overview ¶
Package promotion provides a skeleton for environment promotion workflows (e.g. staging → production) built on workflow definitions. Steps are app-supplied; this package only names phases and builds a definition shell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArg = errors.New("promotion: invalid argument")
Functions ¶
func BuildDefinition ¶
func BuildDefinition(cfg Config) (*workflow.Definition, error)
BuildDefinition constructs a validated workflow Definition for promotion.
Types ¶
type Config ¶
type Config struct {
Name string // workflow name; default "promote"
FromEnv string
ToEnv string
Hooks Hooks
}
Config names the workflow and wires hooks.
type Hooks ¶
type Hooks struct {
Validate workflow.ActionFunc
Prepare workflow.ActionFunc
Promote workflow.ActionFunc
Verify workflow.ActionFunc
Rollback workflow.CompensateFunc // compensates Promote
}
Hooks are app-supplied promotion actions.
Click to show internal directories.
Click to hide internal directories.