driver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	K() string
	V() []byte
}

type Executor

type Executor interface {
	Done()
	GetState(namespace string, key string) ([]byte, error)
	GetStateRangeScanIterator(namespace string, s string, e string) (Iterator, error)
	GetStateMetadata(namespace string, id string) (map[string][]byte, error)
}

type Iterator

type Iterator interface {
	Close()
	Next() (Entry, error)
}

type RWSet

type RWSet interface {
	SetState(namespace string, key string, value []byte) error
	GetState(namespace string, key string) ([]byte, error)
	DeleteState(namespace string, key string) error
}

RWSet interface, used to read from, and write to, a rwset.

type ValidationCode added in v0.3.0

type ValidationCode int
const (
	Valid           ValidationCode // Transaction is valid and committed
	Invalid                        // Transaction is invalid and has been discarded
	Busy                           // Transaction does not yet have a validity state
	Unknown                        // Transaction is unknown
	HasDependencies                // Transaction is unknown but has known dependencies
)

type Vault

type Vault interface {
	NewQueryExecutor() (Executor, error)
	DeleteTokens(ns string, ids ...*token.ID) error
	TransactionStatus(txID string) (ValidationCode, error)
}

Jump to

Keyboard shortcuts

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