Help us shape the future of Go! Take the 2026 Go Developer Survey

state

package
v0.19.1256 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllPartials is the ordered list of all state partials.

HintToPartials maps a hint type to the partials it affects.

Functions

This section is empty.

Types

type ExecuteRegenerationRequest

type ExecuteRegenerationRequest struct {
	InstallID       string
	TriggeredByID   string
	TriggeredByType string

	Targets        []PartialTarget
	ForceAll       bool
	CachedState    *pkgstate.State
	LastModifiedAt map[PartialName]time.Time

	// MetricsWriter is optional — when set, Regenerate emits timing and count metrics.
	MetricsWriter metrics.Writer
}

type ExecuteRegenerationResponse

type ExecuteRegenerationResponse struct {
	State           *pkgstate.State
	UpdatedPartials []PartialName
	LastModifiedAt  map[PartialName]time.Time
	GeneratedAt     time.Time
	AppID           string
	AppName         string
	AppConfigID     string
}

type HintType

type HintType string

HintType describes what changed, allowing callers to build a []PartialTarget via TargetsForHint.

const (
	HintDeployCompleted      HintType = "deploy-completed"
	HintComponentTeardown    HintType = "component-teardown"
	HintSandboxProvisioned   HintType = "sandbox-provisioned"
	HintSandboxDeprovisioned HintType = "sandbox-deprovisioned"
	HintSandboxReprovisioned HintType = "sandbox-reprovisioned"
	HintActionRan            HintType = "action-ran"
	HintStackRunCompleted    HintType = "stack-run-completed"
	HintStackOutputsUpdated  HintType = "stack-outputs-updated"
	HintInputsUpdated        HintType = "inputs-updated"
	HintSecretsUpdated       HintType = "secrets-updated"
	HintRunnerUpdated        HintType = "runner-updated"
	HintAppConfigUpdated     HintType = "app-config-updated"
	HintInstallCreated       HintType = "install-created"
)

type Metrics added in v0.19.1192

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

func NewMetrics added in v0.19.1192

func NewMetrics(provider metric.MeterProvider) *Metrics

func (*Metrics) Record added in v0.19.1192

func (m *Metrics) Record(ctx context.Context, operation string, started time.Time, err error)

func (*Metrics) RecordSourceWaitTimeout added in v0.19.1249

func (m *Metrics) RecordSourceWaitTimeout(ctx context.Context)

type PartialName

type PartialName string

PartialName identifies a component of install state that can be independently regenerated.

const (
	PartialOrg        PartialName = "org"
	PartialApp        PartialName = "app"
	PartialDomain     PartialName = "domain"
	PartialRunner     PartialName = "runner"
	PartialCloud      PartialName = "cloud"
	PartialActions    PartialName = "actions"
	PartialInputs     PartialName = "inputs"
	PartialComponents PartialName = "components"
	PartialSandbox    PartialName = "sandbox"
	PartialStack      PartialName = "stack"
	PartialSecrets    PartialName = "secrets"
)

type PartialTarget

type PartialTarget struct {
	Name     PartialName
	EntityID string
}

PartialTarget identifies a specific partial and optionally a single entity within it. EntityID scopes the update to one entity (e.g. an install_component_id for PartialComponents, or an install_action_workflow_id for PartialActions). Empty EntityID means refresh the whole partial.

func AllPartialTargets

func AllPartialTargets() []PartialTarget

func TargetsForHint

func TargetsForHint(hintType HintType, entityID string) []PartialTarget

TargetsForHint converts a HintType + optional entityID into a []PartialTarget. Use this when callers know the specific entity that changed (e.g. a component ID after deploy).

Jump to

Keyboard shortcuts

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