strategies

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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.

func (*BlueGreen) Execute

func (s *BlueGreen) Execute(ctx context.Context, params deploy.StrategyParams) error

Execute performs a blue-green deployment by spinning up a new environment and switching traffic to it.

func (*BlueGreen) Name

func (s *BlueGreen) Name() string

Name returns the strategy identifier.

type Canary

type Canary struct{}

Canary implements a canary deployment strategy that routes a percentage of traffic to the new version before full promotion.

func NewCanary

func NewCanary() *Canary

NewCanary returns a new canary deployment strategy.

func (*Canary) Execute

func (s *Canary) Execute(ctx context.Context, params deploy.StrategyParams) error

Execute performs a canary deployment by routing incremental traffic to the new version and promoting once validated.

func (*Canary) Name

func (s *Canary) Name() string

Name returns the strategy identifier.

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.

func (*Recreate) Execute

func (s *Recreate) Execute(ctx context.Context, params deploy.StrategyParams) error

Execute performs a recreate deployment by stopping the current version and starting the new one.

func (*Recreate) Name

func (s *Recreate) Name() string

Name returns the strategy identifier.

type Rolling

type Rolling struct{}

Rolling implements a rolling update strategy that gradually replaces instances with the new version.

func NewRolling

func NewRolling() *Rolling

NewRolling returns a new rolling update strategy.

func (*Rolling) Execute

func (s *Rolling) Execute(ctx context.Context, params deploy.StrategyParams) error

Execute performs a rolling deployment by gradually replacing instances.

func (*Rolling) Name

func (s *Rolling) Name() string

Name returns the strategy identifier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL