apply

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package apply provides the global apply command for applying all staged changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(cfg stgcli.GlobalConfig) *cli.Command

Command returns the global apply command for the given provider config.

Types

type Runner

type Runner struct {
	// Services lists the configured provider services (with staged changes) in
	// stable apply order, each carrying its own store.
	Services []ServiceApply
	// ProviderLabel is the human-readable provider name (e.g. "AWS").
	ProviderLabel   string
	Stdout          io.Writer
	Stderr          io.Writer
	IgnoreConflicts bool
}

Runner executes the apply command.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run executes the apply command over the pre-gathered per-service stores.

type ServiceApply added in v0.8.1

type ServiceApply struct {
	Service staging.Service
	// Store is this service's own working store (App Configuration and Key Vault
	// live in separate buckets).
	Store store.ReadWriteOperator
	// Strategy is the default (namespace-agnostic) apply strategy.
	Strategy staging.ApplyStrategy
	// StrategyFor, when set, resolves a strategy per namespace so each App
	// Configuration entry applies under its own namespace. Nil elsewhere.
	StrategyFor func(namespace string) (staging.ApplyStrategy, error)
	// Entries/Tags are this service's staged changes, pre-listed from its store,
	// keyed by the (name, namespace) EntryKey.
	Entries map[staging.EntryKey]staging.Entry
	Tags    map[staging.EntryKey]staging.TagEntry
}

ServiceApply pairs a service with its (possibly nil) apply strategy. The strategy is nil when no changes are staged for that service.

Jump to

Keyboard shortcuts

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