backendspi

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package backendspi defines the internal transaction port consumed by the domain kernel. Runtime adapts the public storage contract at composition.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Backend

type Backend interface {
	View(context.Context, func(ReadTx) error) error
	Update(context.Context, func(WriteTx) error) error
}

type ReadTx

type ReadTx interface {
	Get(namespace string, key []byte) ([]byte, error)
	Scan(ScanRequest) (ScanPage, error)
}

type Record

type Record struct {
	Key   []byte
	Value []byte
}

type ScanPage

type ScanPage struct {
	Records []Record
	HasMore bool
	Next    []byte
}

type ScanRequest

type ScanRequest struct {
	Namespace string
	Start     []byte
	End       []byte
	After     []byte
	Limit     int
}

type WriteTx

type WriteTx interface {
	ReadTx
	Put(namespace string, key, value []byte) error
	Delete(namespace string, key []byte) error
}

Jump to

Keyboard shortcuts

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