bootstrap

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear() error

Clear removes the bootstrap state file

func NeedsBootstrap

func NeedsBootstrap(config *schema.Config) bool

NeedsBootstrap checks if any bootstrap steps need to be run

Types

type Runner

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

Runner executes bootstrap steps

func NewRunner

func NewRunner(config *schema.Config, force bool) (*Runner, error)

NewRunner creates a new bootstrap runner

func (*Runner) Run

func (r *Runner) Run() error

Run executes all bootstrap steps

type State

type State struct {
	Version string                `json:"version"`
	LastRun time.Time             `json:"last_run"`
	Steps   map[string]*StepState `json:"steps"`
}

State represents the bootstrap state

func LoadState

func LoadState() (*State, error)

LoadState loads the bootstrap state from disk

func (*State) GetStep

func (s *State) GetStep(name string) *StepState

GetStep retrieves the state of a bootstrap step

func (*State) Save

func (s *State) Save() error

SaveState saves the bootstrap state to disk

func (*State) UpdateStep

func (s *State) UpdateStep(name string, stepState *StepState)

UpdateStep updates the state of a bootstrap step

type StepState

type StepState struct {
	Status      string    `json:"status"` // completed, failed, skipped
	CompletedAt time.Time `json:"completed_at"`
	Target      string    `json:"target"`
	Error       string    `json:"error,omitempty"`
	LastAttempt time.Time `json:"last_attempt,omitempty"`
}

StepState represents the state of a single bootstrap step

Jump to

Keyboard shortcuts

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