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

localstate

package
v0.38.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalState

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

func New

func New(cfg *confutil.Config) (*LocalState, error)

func (*LocalState) GroupDir added in v0.21.3

func (ls *LocalState) GroupDir() string

func (*LocalState) MigrateIfNeeded added in v0.21.3

func (ls *LocalState) MigrateIfNeeded() error

func (*LocalState) ReadGroup added in v0.12.0

func (ls *LocalState) ReadGroup(id string) (*StateGroup, error)

func (*LocalState) ReadRef

func (ls *LocalState) ReadRef(builderName, nodeName, id string) (*State, error)

func (*LocalState) RemoveBuilder

func (ls *LocalState) RemoveBuilder(builderName string) error

func (*LocalState) RemoveBuilderNode

func (ls *LocalState) RemoveBuilderNode(builderName string, nodeName string) error

RemoveBuilderNode removes all refs for a builder node. This func is not safe for concurrent use from multiple goroutines.

func (*LocalState) SaveGroup added in v0.12.0

func (ls *LocalState) SaveGroup(id string, stg StateGroup) error

func (*LocalState) SaveRef

func (ls *LocalState) SaveRef(builderName, nodeName, id string, st State) error

type State

type State struct {
	// Target is the name of the invoked target (default if empty)
	Target string
	// LocalPath is the absolute path to the context or remote context
	LocalPath string
	// DockerfilePath is the absolute path to the Dockerfile or relative if
	// context is remote
	DockerfilePath string
	// GroupRef is the ref of the state group that this ref belongs to
	GroupRef string `json:",omitempty"`
}

type StateGroup added in v0.12.0

type StateGroup struct {
	// Targets are the targets invoked
	Targets []string `json:",omitempty"`
	// Refs are used to track all the refs that belong to the same group
	Refs []string
}

Jump to

Keyboard shortcuts

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