blob

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 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 BlobStore

type BlobStore interface {
	// Transaction management
	Close() error
	NewTransaction(bool) types.Txn

	// KV operations (plugins map these to their internals with transaction context)
	Get(txn types.Txn, key []byte) ([]byte, error)
	Set(txn types.Txn, key, val []byte) error
	Delete(txn types.Txn, key []byte) error
	NewIterator(
		txn types.Txn,
		opts types.BlobIteratorOptions,
	) types.BlobIterator

	// Commit timestamp management
	GetCommitTimestamp() (int64, error)
	// SetCommitTimestamp stores the last commit timestamp; parameter order is
	// (timestamp, txn) to keep the transaction as the final parameter.
	SetCommitTimestamp(int64, types.Txn) error
}

BlobStore defines the interface for a blob storage provider. All transactional methods (Get, Set, Delete, NewIterator, SetCommitTimestamp) require a non-nil types.Txn created by NewTransaction(). Passing nil will result in types.ErrNilTxn.

Important: iterators returned by `NewIterator` yield `Item()` values that must only be accessed while the transaction used to create the iterator is still active. Implementations may validate transaction state at access time (for example `ValueCopy` may fail if the transaction has been committed or rolled back). Typical usage iterates and accesses item values within the same transaction scope.

func New

func New(pluginName string) (BlobStore, error)

New returns the started blob plugin selected by name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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