apply

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package apply orchestrates the dotdrift pipeline with always-resume semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoOpStep

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

NoOpStep is a step that does nothing; useful for placeholders like hooks in v0.1.

func NewNoOpStep

func NewNoOpStep(name string) *NoOpStep

NewNoOpStep creates a no-op step with the given name.

func (*NoOpStep) Name

func (s *NoOpStep) Name() string

func (*NoOpStep) Run

func (s *NoOpStep) Run(ctx context.Context) error

type Pipeline

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

Pipeline runs a list of steps, resuming from the persisted state.

func NewPipeline

func NewPipeline(steps []Step, save func(*state.State) error) *Pipeline

NewPipeline constructs a pipeline with the given steps and a save callback.

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context) error

Run executes the pipeline from the first incomplete step.

func (*Pipeline) SetState

func (p *Pipeline) SetState(s *state.State)

SetState sets the initial state. It should be reset for selection changes before calling.

func (*Pipeline) State

func (p *Pipeline) State() *state.State

State returns the current pipeline state.

func (*Pipeline) StepNames

func (p *Pipeline) StepNames() []string

StepNames returns the ordered step names.

func (*Pipeline) Steps

func (p *Pipeline) Steps() []Step

Steps returns the ordered steps.

type Step

type Step interface {
	Name() string
	Run(ctx context.Context) error
}

Step is a single stage in the apply pipeline.

Jump to

Keyboard shortcuts

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