Documentation ¶
Index ¶
- Variables
- type ByNum
- type ByTxid
- type Inspector
- func (i *Inspector) AppendRWSet(raw []byte, nss ...string) error
- func (i *Inspector) Bytes() ([]byte, error)
- func (i *Inspector) Clear(ns string) error
- func (i *Inspector) DeleteState(namespace string, key string) error
- func (i *Inspector) Done()
- func (i *Inspector) Equals(other interface{}, nss ...string) error
- func (i *Inspector) GetReadAt(ns string, pos int) (string, []byte, error)
- func (i *Inspector) GetReadKeyAt(ns string, pos int) (string, error)
- func (i *Inspector) GetState(namespace string, key string, opts ...driver.GetStateOpt) ([]byte, error)
- func (i *Inspector) GetStateMetadata(namespace, key string, opts ...driver.GetStateOpt) (map[string][]byte, error)
- func (i *Inspector) GetWriteAt(ns string, pos int) (string, []byte, error)
- func (i *Inspector) IsValid() error
- func (i *Inspector) Namespaces() []string
- func (i *Inspector) NumReads(ns string) int
- func (i *Inspector) NumWrites(ns string) int
- func (i *Inspector) SetState(namespace string, key string, value []byte) error
- func (i *Inspector) SetStateMetadata(namespace, key string, metadata map[string][]byte) error
- type Interceptor
- func (i *Interceptor) AppendRWSet(raw []byte, nss ...string) error
- func (i *Interceptor) Bytes() ([]byte, error)
- func (i *Interceptor) Clear(ns string) error
- func (i *Interceptor) DeleteState(namespace string, key string) error
- func (i *Interceptor) Done()
- func (i *Interceptor) Equals(other interface{}, nss ...string) error
- func (i *Interceptor) GetReadAt(ns string, pos int) (string, []byte, error)
- func (i *Interceptor) GetReadKeyAt(ns string, pos int) (string, error)
- func (i *Interceptor) GetState(namespace string, key string, opts ...driver.GetStateOpt) ([]byte, error)
- func (i *Interceptor) GetStateMetadata(namespace, key string, opts ...driver.GetStateOpt) (map[string][]byte, error)
- func (i *Interceptor) GetWriteAt(ns string, pos int) (string, []byte, error)
- func (i *Interceptor) IsValid() error
- func (i *Interceptor) Namespaces() []string
- func (i *Interceptor) NumReads(ns string) int
- func (i *Interceptor) NumWrites(ns string) int
- func (i *Interceptor) SetState(namespace string, key string, value []byte) error
- func (i *Interceptor) SetStateMetadata(namespace string, key string, value map[string][]byte) error
- type QueryExecutor
- type SimpleTXIDStore
- type SimpleTxidIterator
- type TXIDStore
- type TXIDStoreReader
- type Vault
- func (db *Vault) Close() error
- func (db *Vault) CommitTX(txid string, block uint64, indexInBloc int) error
- func (db *Vault) DiscardTx(txid string) error
- func (db *Vault) GetRWSet(txid string, rwsetBytes []byte) (*Interceptor, error)
- func (db *Vault) InspectRWSet(rwsetBytes []byte, namespaces ...string) (*Inspector, error)
- func (db *Vault) Match(txid string, rwsRaw []byte) error
- func (db *Vault) NewQueryExecutor() (odriver.QueryExecutor, error)
- func (db *Vault) NewRWSet(txid string) (*Interceptor, error)
- func (db *Vault) RWSExists(txid string) bool
- func (db *Vault) SetBusy(txid string) error
- func (db *Vault) Status(txid string) (odriver.ValidationCode, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_txid_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ByNum ¶
type ByNum struct { Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*ByNum) Descriptor
deprecated
func (*ByNum) ProtoMessage ¶
func (*ByNum) ProtoMessage()
func (*ByNum) ProtoReflect ¶
func (x *ByNum) ProtoReflect() protoreflect.Message
type ByTxid ¶
type ByTxid struct { Pos uint64 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*ByTxid) Descriptor
deprecated
func (*ByTxid) ProtoMessage ¶
func (*ByTxid) ProtoMessage()
func (*ByTxid) ProtoReflect ¶
func (x *ByTxid) ProtoReflect() protoreflect.Message
type Inspector ¶
type Inspector struct {
// contains filtered or unexported fields
}
func (*Inspector) GetReadKeyAt ¶
func (*Inspector) GetStateMetadata ¶
func (*Inspector) GetWriteAt ¶
func (*Inspector) Namespaces ¶
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
func (*Interceptor) AppendRWSet ¶
func (i *Interceptor) AppendRWSet(raw []byte, nss ...string) error
func (*Interceptor) Bytes ¶
func (i *Interceptor) Bytes() ([]byte, error)
func (*Interceptor) Clear ¶
func (i *Interceptor) Clear(ns string) error
func (*Interceptor) DeleteState ¶
func (i *Interceptor) DeleteState(namespace string, key string) error
func (*Interceptor) Done ¶
func (i *Interceptor) Done()
func (*Interceptor) Equals ¶
func (i *Interceptor) Equals(other interface{}, nss ...string) error
func (*Interceptor) GetReadKeyAt ¶
func (i *Interceptor) GetReadKeyAt(ns string, pos int) (string, error)
func (*Interceptor) GetState ¶
func (i *Interceptor) GetState(namespace string, key string, opts ...driver.GetStateOpt) ([]byte, error)
func (*Interceptor) GetStateMetadata ¶
func (i *Interceptor) GetStateMetadata(namespace, key string, opts ...driver.GetStateOpt) (map[string][]byte, error)
func (*Interceptor) GetWriteAt ¶
func (*Interceptor) IsValid ¶
func (i *Interceptor) IsValid() error
func (*Interceptor) Namespaces ¶
func (i *Interceptor) Namespaces() []string
func (*Interceptor) NumReads ¶
func (i *Interceptor) NumReads(ns string) int
func (*Interceptor) NumWrites ¶
func (i *Interceptor) NumWrites(ns string) int
func (*Interceptor) SetState ¶
func (i *Interceptor) SetState(namespace string, key string, value []byte) error
func (*Interceptor) SetStateMetadata ¶
type QueryExecutor ¶
type SimpleTXIDStore ¶
type SimpleTXIDStore struct {
// contains filtered or unexported fields
}
func NewSimpleTXIDStore ¶
func NewSimpleTXIDStore(persistence driver.Persistence) (*SimpleTXIDStore, error)
func (*SimpleTXIDStore) Get ¶
func (s *SimpleTXIDStore) Get(txid string) (odriver.ValidationCode, error)
func (*SimpleTXIDStore) GetLastTxID ¶
func (s *SimpleTXIDStore) GetLastTxID() (string, error)
func (*SimpleTXIDStore) Iterator ¶
func (s *SimpleTXIDStore) Iterator(pos interface{}) (odriver.TxidIterator, error)
func (*SimpleTXIDStore) Set ¶
func (s *SimpleTXIDStore) Set(txid string, code odriver.ValidationCode) error
type SimpleTxidIterator ¶
type SimpleTxidIterator struct {
// contains filtered or unexported fields
}
func (*SimpleTxidIterator) Close ¶
func (i *SimpleTxidIterator) Close()
type TXIDStore ¶
type TXIDStore interface { TXIDStoreReader Set(txid string, code odriver.ValidationCode) error }
type TXIDStoreReader ¶
type TXIDStoreReader interface {
Get(txid string) (odriver.ValidationCode, error)
}
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
Vault models a key-value store that can be modified by committing rwsets
func New ¶
func New(store driver.VersionedPersistence, txIDStore TXIDStore) *Vault
New returns a new instance of Vault
func (*Vault) GetRWSet ¶
func (db *Vault) GetRWSet(txid string, rwsetBytes []byte) (*Interceptor, error)
func (*Vault) InspectRWSet ¶
func (*Vault) NewQueryExecutor ¶
func (db *Vault) NewQueryExecutor() (odriver.QueryExecutor, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.