bolt

package
v0.0.1-prerelease9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type PhaseLogger

type PhaseLogger[R core.Resource] struct {
	// contains filtered or unexported fields
}

func New

func New[R core.Resource](db *bbolt.DB) *PhaseLogger[R]

func (*PhaseLogger[R]) CreateLog

func (l *PhaseLogger[R]) CreateLog(ctx context.Context, phase core.Descriptor) error

func (*PhaseLogger[R]) GetResourceAtVersion

func (l *PhaseLogger[R]) GetResourceAtVersion(ctx context.Context, phase core.Descriptor, v uuid.UUID) (r R, _ error)

GetResourceAtVersion returns the state of the resource at a given point in history identified by the provided version

func (*PhaseLogger[R]) History

func (l *PhaseLogger[R]) History(ctx context.Context, phase core.Descriptor) (states []core.State, _ error)

Histort returns a slice of states for a provided phase descriptor.

func (*PhaseLogger[R]) RecordLatest

func (l *PhaseLogger[R]) RecordLatest(ctx context.Context, phase core.Descriptor, resource R, annotations map[string]string) error

Jump to

Keyboard shortcuts

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