Documentation
¶
Overview ¶
Package strategies provides built-in deployment strategy implementations. Strategies control how application updates are rolled out to instances.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlueGreen ¶
type BlueGreen struct{}
BlueGreen implements a blue-green deployment strategy that provisions a new environment and switches traffic once ready.
func NewBlueGreen ¶
func NewBlueGreen() *BlueGreen
NewBlueGreen returns a new blue-green deployment strategy.
type Canary ¶
type Canary struct{}
Canary implements a canary deployment strategy that rolls services out one at a time, marking each as succeeded before moving to the next. If any service fails, the strategy aborts — services not yet rolled out stay pending; the deploy.Service marks the deployment itself Failed so callers can rollback the whole release.
Canary uses partial-deploy semantics: each Deploy call to the provider lists exactly one service. The provider patches that service's container/task in place without disturbing the rest.
type Recreate ¶
type Recreate struct{}
Recreate implements a recreate deployment strategy that stops the current version before starting the new one, resulting in brief downtime.
func NewRecreate ¶
func NewRecreate() *Recreate
NewRecreate returns a new recreate deployment strategy.
type Rolling ¶
type Rolling struct{}
Rolling implements a rolling update strategy that gradually replaces instances with the new version.
func (*Rolling) Execute ¶
Execute performs a rolling deployment by handing the entire Services slice to the provider in one shot — the provider's runtime (k8s rollingUpdate, nomad update, docker recreate-per-service) does the per-replica gradient. ServiceProgress is updated in lockstep: every service goes pending → running → succeeded together.