state

package
v0.0.0-...-ed0863b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	*domain.StateBase
}

State implements persistence for unit state.

func NewState

func NewState(factory database.TxnRunnerFactory) *State

NewState returns a new state reference.

func (*State) GetUnitState

func (st *State) GetUnitState(ctx context.Context, name coreunit.Name) (unitstate.RetrievedUnitState, error)

GetUnitState returns the full unit state. The state may be empty. If no unit with the namw exists, a errors.UnitNotFound error is returned.

func (*State) SetUnitState

func (st *State) SetUnitState(ctx context.Context, as unitstate.UnitState) error

Jump to

Keyboard shortcuts

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