hydra_git

package
v0.51.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	// NewTransaction returns a new transaction against the store.
	// Indicate write if the transaction will not be read-only.
	// Always call Discard() after you are done with the transaction.
	// Check GetReadOnly, might not return a write tx if write=true.
	// ctx is only used when constructing the transaction.
	NewTransaction(ctx context.Context, write bool) (Tx, error)
}

Engine is the interface for a transactional Git engine.

func NewFuncEngine

func NewFuncEngine(
	buildTx func(ctx context.Context, write bool) (Tx, error),
) Engine

NewFuncEngine constructs an Engine from a transaction factory function.

type Storer

type Storer interface {
	// Storer is the go-git storage interface.
	storage.Storer
	// GetReadOnly returns if the state is read-only.
	GetReadOnly() bool
}

Storer is the interface for storing Git repository data.

type Tx

type Tx interface {
	// Tx contains the commit and discard funcs.
	tx.Tx
	// Storer implements the Git storage.
	Storer
}

Tx implements a storer as a transaction.

func NewFuncTx

func NewFuncTx(
	storer Storer,
	commit func(ctx context.Context) error,
	discard func(),
) Tx

NewFuncTx constructs a Tx from a Storer plus commit/discard callbacks.

Directories

Path Synopsis
Package unixfs_git implements a git-backed FSCursor.
Package unixfs_git implements a git-backed FSCursor.

Jump to

Keyboard shortcuts

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