staging

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: GPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGotKV

func DefaultGotKV() gotkv.Machine

func PutInfo added in v0.3.0

func PutInfo(ctx context.Context, fsmach *gotfs.Machine, ms stores.RW, p string, info gotfs.Info) (*gotfs.Root, error)

PutInfo creates a root, which can be used to overwrite just the info.

Types

type DeleteOp

type DeleteOp struct{}

DeleteOp deletes a path and everything beneath it

type Entry

type Entry struct {
	Path string    `json:"p"`
	Op   Operation `json:"op"`
}

type Iterator

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

func (*Iterator) Next

func (it *Iterator) Next(ctx context.Context, dsts []Entry) (int, error)

type Operation

type Operation struct {
	Delete *DeleteOp `json:"del,omitempty"`
	Put    *PutOp    `json:"put,omitempty"`
}

type PutOp

type PutOp = gotfs.Root

PutOp replaces a path with a filesystem.

type Tx

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

Tx is a transaction on a stage

func New

func New(kvmach *gotkv.Machine, tx volumes.Tx, paramHash *[32]byte) *Tx

New wraps a transaction to create a transaction on a Stage paramHash if not-nil, causes operations to error if it does not match the paramHash in the stage

func (*Tx) Abort

func (tx *Tx) Abort(ctx context.Context) error

func (*Tx) CheckConflict

func (tx *Tx) CheckConflict(ctx context.Context, p string) error

func (*Tx) Clear

func (tx *Tx) Clear(ctx context.Context) error

Clear deletes all entries from the staging area

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) CreateFunction added in v0.4.0

func (tx *Tx) CreateFunction(ctx context.Context, fsag *gotfs.Machine, ss gotfs.RW) (gotfsvm.Function, error)

func (*Tx) Delete

func (tx *Tx) Delete(ctx context.Context, p string) error

Delete removes a file at p with root

func (*Tx) Discard

func (tx *Tx) Discard(ctx context.Context, p string) error

func (*Tx) ForEach

func (tx *Tx) ForEach(ctx context.Context, fn func(Entry) error) error

func (*Tx) Get

func (tx *Tx) Get(ctx context.Context, p string, dst *Operation) (bool, error)

Get returns the operation, if any, staged for the path p If there is no operation staged Get returns (nil, nil)

func (*Tx) IsEmpty

func (tx *Tx) IsEmpty(ctx context.Context) (bool, error)

func (*Tx) Iterate

func (tx *Tx) Iterate(ctx context.Context, span gotkv.Span) (*Iterator, error)

func (*Tx) PutRoot added in v0.3.0

func (tx *Tx) PutRoot(ctx context.Context, p string, root gotfs.Root) error

Put replaces a path at p with root

func (*Tx) Store

func (tx *Tx) Store() stores.RW

Jump to

Keyboard shortcuts

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