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

replay

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package replay re-applies the host-side records in $OBOL_CONFIG_DIR to the cluster. Every piece of operator state that only lives in etcd has a record-on-write file next to the stack config; ReplayRecorded is the ONE ordered list that brings a fresh (or reset) cluster back in line with them. `obol stack up` and `obol sell resume` both call it, so a host reboot and a full cluster recreation converge on the same state.

The order is defined, and justified step by step, on Order.

Every step is best-effort: a failure (returned error or any warning the step printed) is reported per step and in the closing summary, and never aborts the remaining steps or `stack up`.

Index

Constants

View Source
const (
	StepModels         = "models"
	StepNetworks       = "networks"
	StepRPCUpstreams   = "rpc-upstreams"
	StepERPCOverlay    = "erpc-overlay"
	StepX402Pricing    = "x402-pricing"
	StepAgentIdentity  = "agent-identity"
	StepAgentInstances = "agent-instances"
	StepAgentCRs       = "agent-crs"
	StepStorefront     = "storefront"
	StepApps           = "apps"
	StepSellOffers     = "sell-offers"
)

Step names, in replay order (see the package doc for why).

Variables

Order is the single replay list shared by `obol stack up` and `obol sell resume`. Each step depends only on steps above it.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ResumeSellOffers replays persisted ServiceOffers and relaunches
	// sell-inference host gateways (cmd/obol resumeSellOffers). nil skips
	// the step.
	ResumeSellOffers func(ctx context.Context, cfg *config.Config, u *ui.UI) error
}

Options carries the steps implemented outside internal/ (package main).

type Step

type Step struct {
	Name string
	Run  StepFunc
}

Step is one named entry of the replay list.

func Steps

func Steps(opts Options) []Step

Steps returns the replay list in Order.

type StepFunc

type StepFunc func(ctx context.Context, cfg *config.Config, u *ui.UI) error

StepFunc runs one replay step. A returned error marks the step warned.

type Summary

type Summary struct {
	OK     []string
	Warned []string
	// Errors holds the error returned by each failed step (steps that only
	// printed warnings are in Warned without an entry here).
	Errors map[string]error
}

Summary reports the outcome of a replay.

func ReplayRecorded

func ReplayRecorded(ctx context.Context, cfg *config.Config, u *ui.UI, opts Options) Summary

ReplayRecorded runs every replay step in Order against cfg's cluster.

Jump to

Keyboard shortcuts

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