manager

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command added in v0.10.0

type Command struct {
	// contains filtered or unexported fields
}

type ConfigurationOperations added in v0.11.0

type ConfigurationOperations map[string](map[string]string)

ConfigurationOperations is a map describing the operation associated to each remote/branch. It is a map looking such as: { origin: { main: switch, testing: test }, local { main: switch }

type Confirmer added in v0.10.0

type Confirmer struct {
	// contains filtered or unexported fields
}

Confirmer allows to handle user confirmations. A generation is submitted to the confirmer. Once a generation has been confirmed, it is pushed to the submit channel.

func NewConfirmer added in v0.10.0

func NewConfirmer(broker *broker.Broker, mode Mode, duration time.Duration, reason string) *Confirmer

func (*Confirmer) Cancel added in v0.10.0

func (c *Confirmer) Cancel()

func (*Confirmer) Confirm added in v0.10.0

func (c *Confirmer) Confirm(generationUuid string)

func (*Confirmer) Start added in v0.10.0

func (c *Confirmer) Start()

func (*Confirmer) Submit added in v0.10.0

func (c *Confirmer) Submit(generationUuid string)

type Manager

type Manager struct {
	Fetcher *fetcher.Fetcher
	Builder *builder.Builder

	BuildConfirmer  *Confirmer
	DeployConfirmer *Confirmer
	// contains filtered or unexported fields
}

func New

func New(s *store.Store,
	p prometheus.Prometheus,
	sched scheduler.Scheduler,
	fetcher *fetcher.Fetcher,
	builder *builder.Builder,
	deployer *deployer.Deployer,
	machineId string,
	executor executor.Executor,
	buildConfirmer *Confirmer,
	deployConfirmer *Confirmer,
	broker *broker.Broker,
	configurationOperations ConfigurationOperations,
) *Manager

func (*Manager) FetchAndBuild added in v0.6.0

func (m *Manager) FetchAndBuild(ctx context.Context)

FetchAndBuild fetches new commits. If a new commit is available, it evaluates and builds the derivation. Once built, it pushes the generation on a channel which is consumed by the deployer.

func (*Manager) GetState

func (m *Manager) GetState() *protobuf.State

func (*Manager) Resume added in v0.9.0

func (m *Manager) Resume(ctx context.Context) error

func (*Manager) Run

func (m *Manager) Run(ctx context.Context)

func (*Manager) Suspend added in v0.9.0

func (m *Manager) Suspend() error

func (*Manager) SwitchDeploymentLatest added in v0.11.0

func (m *Manager) SwitchDeploymentLatest() error

type Mode added in v0.10.0

type Mode int64
const (
	// The user needs to confirm the generation
	Manual Mode = iota
	// Confirm after several seconds the generation. This can be
	// cancelled by the user.
	Auto
	// Immediately confirm the submitted generation
	Without
)

func ParseMode added in v0.10.0

func ParseMode(s string) (Mode, error)

Jump to

Keyboard shortcuts

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