Documentation
¶
Index ¶
- Variables
- func BenchmarkBuilder(b *testing.B)
- func BenchmarkConcatenation(b *testing.B)
- func FromBytes(data driver3.RawVersion) (driver3.BlockNum, driver3.TxNum, error)
- func IsLast(tableName common4.TableName) *isLast
- func TTestCompositeKeys(t *testing.T, db driver.KeyValueStore)
- func TTestDB1(t *testing.T, db driver.KeyValueStore)
- func TTestDB2(t *testing.T, db driver.KeyValueStore)
- func TTestDuplicate(t *testing.T, _ *sql.DB, writeDB common.WriteDB, ...)
- func TTestGetNonExistent(t *testing.T, db driver.KeyValueStore)
- func TTestMultiWrites(t *testing.T, db driver.KeyValueStore)
- func TTestMultiWritesAndRangeQueries(t *testing.T, db driver.KeyValueStore)
- func TTestNonUTF8keys(t *testing.T, db driver.KeyValueStore)
- func TTestRangeQueries(t *testing.T, db driver.KeyValueStore)
- func TTestRangeQueries1(t *testing.T, db driver.KeyValueStore)
- func TTestSimpleReadWrite(t *testing.T, db driver.KeyValueStore)
- func TTestUnversionedNotifierSimple(t *testing.T, db driver.UnversionedNotifier)
- func TTestUnversionedRange(t *testing.T, db driver.KeyValueStore)
- func TTestUnversionedSimple(t *testing.T, db driver.KeyValueStore)
- func ToBytes(Block driver3.BlockNum, TxNum driver3.TxNum) []byte
- type EndorseTxStore
- func (db *EndorseTxStore) CreateSchema() error
- func (db *EndorseTxStore) ExistsEndorseTx(ctx context.Context, key string) (bool, error)
- func (db *EndorseTxStore) GetEndorseTx(ctx context.Context, key string) ([]byte, error)
- func (db *EndorseTxStore) PutEndorseTx(ctx context.Context, key string, data []byte) error
- type EnvelopeStore
- func (db *EnvelopeStore) CreateSchema() error
- func (db *EnvelopeStore) ExistsEnvelope(ctx context.Context, key string) (bool, error)
- func (db *EnvelopeStore) GetEnvelope(ctx context.Context, key string) ([]byte, error)
- func (db *EnvelopeStore) PutEnvelope(ctx context.Context, key string, data []byte) error
- type MetadataStore
- func (db *MetadataStore) CreateSchema() error
- func (db *MetadataStore) ExistMetadata(ctx context.Context, key string) (bool, error)
- func (db *MetadataStore) GetMetadata(ctx context.Context, key string) ([]byte, error)
- func (db *MetadataStore) PutMetadata(ctx context.Context, key string, data []byte) error
- type PersistenceConstructor
- type Sanitizer
- type TableNames
- type TracingConfig
- type VaultStore
- func (db *VaultStore) Close() error
- func (db VaultStore) GetAllStates(ctx context.Context, namespace driver.Namespace) (driver.TxStateIterator, error)
- func (db VaultStore) GetAllTxStatuses(ctx context.Context, p driver.Pagination) (*driver.PageIterator[*driver.TxStatus], error)
- func (db VaultStore) GetLast(ctx context.Context) (*driver.TxStatus, error)
- func (db VaultStore) GetState(ctx context.Context, namespace driver.Namespace, key driver.PKey) (*driver.VaultRead, error)
- func (db VaultStore) GetStateMetadata(ctx context.Context, namespace driver.Namespace, key driver.PKey) (driver.Metadata, driver.RawVersion, error)
- func (db VaultStore) GetStateRange(ctx context.Context, namespace driver.Namespace, startKey, endKey driver.PKey) (driver.TxStateIterator, error)
- func (db VaultStore) GetStates(ctx context.Context, namespace driver.Namespace, keys ...driver.PKey) (driver.TxStateIterator, error)
- func (db VaultStore) GetTxStatus(ctx context.Context, txID driver.TxID) (*driver.TxStatus, error)
- func (db VaultStore) GetTxStatuses(ctx context.Context, txIDs ...driver.TxID) (driver.TxStatusIterator, error)
- func (db *VaultStore) NewGlobalLockVaultReader(ctx context.Context) (driver.LockedVaultReader, error)
- func (db *VaultStore) NewTxLockVaultReader(ctx context.Context, txID driver.TxID, isolationLevel driver.IsolationLevel) (driver.LockedVaultReader, error)
- func (db *VaultStore) SetStatuses(ctx context.Context, code driver.TxStatusCode, message string, ...) error
- func (db *VaultStore) SetStatusesBusy(txIDs []driver.TxID, sb common4.Builder)
- func (db *VaultStore) SetStatusesValid(txIDs []driver.TxID, sb common4.Builder)
- func (db *VaultStore) UpsertStates(writes driver.Writes, metaWrites driver.MetaWrites, sb common4.Builder) error
- type VaultTables
Constants ¶
This section is empty.
Variables ¶
View Source
var Cases = []struct { Name string Fn func(*testing.T, driver.KeyValueStore) }{ {"RangeQueries", TTestRangeQueries}, {"SimpleReadWrite", TTestSimpleReadWrite}, {"GetNonExistent", TTestGetNonExistent}, {"DB1", TTestDB1}, {"DB2", TTestDB2}, {"RangeQueries1", TTestRangeQueries1}, {"MultiWritesAndRangeQueries", TTestMultiWritesAndRangeQueries}, {"TTestMultiWrites", TTestMultiWrites}, {"CompositeKeys", TTestCompositeKeys}, }
View Source
var ErrorCases = []struct { Name string Fn func(t *testing.T, readDB *sql.DB, writeDB common.WriteDB, errorWrapper driver.SQLErrorWrapper, table string) }{ {"Duplicate", TTestDuplicate}, }
View Source
var UnversionedCases = []struct { Name string Fn func(*testing.T, driver.KeyValueStore) }{ {"UnversionedSimple", TTestUnversionedSimple}, {"UnversionedRange", TTestUnversionedRange}, {"NonUTF8keys", TTestNonUTF8keys}, }
View Source
var UnversionedNotifierCases = []struct { Name string Fn func(*testing.T, driver.UnversionedNotifier) }{ {"UnversionedNotifierSimple", TTestUnversionedNotifierSimple}, }
Functions ¶
func BenchmarkBuilder ¶
func BenchmarkConcatenation ¶
func TTestCompositeKeys ¶
func TTestCompositeKeys(t *testing.T, db driver.KeyValueStore)
func TTestDuplicate ¶
func TTestGetNonExistent ¶
func TTestGetNonExistent(t *testing.T, db driver.KeyValueStore)
func TTestMultiWrites ¶
func TTestMultiWrites(t *testing.T, db driver.KeyValueStore)
func TTestMultiWritesAndRangeQueries ¶
func TTestMultiWritesAndRangeQueries(t *testing.T, db driver.KeyValueStore)
func TTestNonUTF8keys ¶
func TTestNonUTF8keys(t *testing.T, db driver.KeyValueStore)
Postgres doesn't like non-utf8 in TEXT fields, so we made it a BYTEA. cannot check if key exists: pq: invalid byte sequence for encoding "UTF8": 0xc2 0x32]
func TTestRangeQueries ¶
func TTestRangeQueries(t *testing.T, db driver.KeyValueStore)
func TTestRangeQueries1 ¶
func TTestRangeQueries1(t *testing.T, db driver.KeyValueStore)
func TTestSimpleReadWrite ¶
func TTestSimpleReadWrite(t *testing.T, db driver.KeyValueStore)
func TTestUnversionedNotifierSimple ¶
func TTestUnversionedNotifierSimple(t *testing.T, db driver.UnversionedNotifier)
func TTestUnversionedRange ¶
func TTestUnversionedRange(t *testing.T, db driver.KeyValueStore)
func TTestUnversionedSimple ¶
func TTestUnversionedSimple(t *testing.T, db driver.KeyValueStore)
Types ¶
type EndorseTxStore ¶
type EndorseTxStore struct {
// contains filtered or unexported fields
}
func NewEndorseTxStore ¶
func NewEndorseTxStore(writeDB common3.WriteDB, readDB *sql.DB, table string, errorWrapper driver.SQLErrorWrapper, ci common.CondInterpreter) *EndorseTxStore
func (*EndorseTxStore) CreateSchema ¶
func (db *EndorseTxStore) CreateSchema() error
func (*EndorseTxStore) ExistsEndorseTx ¶
func (*EndorseTxStore) GetEndorseTx ¶
func (*EndorseTxStore) PutEndorseTx ¶
type EnvelopeStore ¶
type EnvelopeStore struct {
// contains filtered or unexported fields
}
func NewEnvelopeStore ¶
func NewEnvelopeStore(writeDB common3.WriteDB, readDB *sql.DB, table string, errorWrapper driver.SQLErrorWrapper, ci common.CondInterpreter) *EnvelopeStore
func (*EnvelopeStore) CreateSchema ¶
func (db *EnvelopeStore) CreateSchema() error
func (*EnvelopeStore) ExistsEnvelope ¶
func (*EnvelopeStore) GetEnvelope ¶
func (*EnvelopeStore) PutEnvelope ¶
type MetadataStore ¶
type MetadataStore struct {
// contains filtered or unexported fields
}
func NewMetadataStore ¶
func NewMetadataStore(writeDB common3.WriteDB, readDB *sql.DB, table string, errorWrapper driver.SQLErrorWrapper, ci common.CondInterpreter) *MetadataStore
func (*MetadataStore) CreateSchema ¶
func (db *MetadataStore) CreateSchema() error
func (*MetadataStore) ExistMetadata ¶
func (*MetadataStore) GetMetadata ¶
func (*MetadataStore) PutMetadata ¶
type PersistenceConstructor ¶
type TableNames ¶
type TableNames struct { EndorseTx string Metadata string Envelope string State string Status string }
func GetTableNames ¶
func GetTableNames(prefix string, params ...string) TableNames
type TracingConfig ¶
type TracingConfig struct{}
type VaultStore ¶
func NewVaultStore ¶
func NewVaultStore(writeDB common3.WriteDB, readDB *sql.DB, tables VaultTables, errorWrapper driver2.SQLErrorWrapper, ci common4.CondInterpreter, pi common4.PagInterpreter, sanitizer sql2.Sanitizer, il common3.IsolationLevelMapper) *VaultStore
func (*VaultStore) Close ¶
func (db *VaultStore) Close() error
func (VaultStore) GetAllStates ¶
func (VaultStore) GetAllTxStatuses ¶
func (db VaultStore) GetAllTxStatuses(ctx context.Context, p driver.Pagination) (*driver.PageIterator[*driver.TxStatus], error)
func (VaultStore) GetStateMetadata ¶
func (VaultStore) GetStateRange ¶
func (VaultStore) GetTxStatus ¶
func (VaultStore) GetTxStatuses ¶
func (*VaultStore) NewGlobalLockVaultReader ¶
func (db *VaultStore) NewGlobalLockVaultReader(ctx context.Context) (driver.LockedVaultReader, error)
func (*VaultStore) NewTxLockVaultReader ¶
func (db *VaultStore) NewTxLockVaultReader(ctx context.Context, txID driver.TxID, isolationLevel driver.IsolationLevel) (driver.LockedVaultReader, error)
func (*VaultStore) SetStatuses ¶
func (db *VaultStore) SetStatuses(ctx context.Context, code driver.TxStatusCode, message string, txIDs ...driver.TxID) error
func (*VaultStore) SetStatusesBusy ¶
func (db *VaultStore) SetStatusesBusy(txIDs []driver.TxID, sb common4.Builder)
func (*VaultStore) SetStatusesValid ¶
func (db *VaultStore) SetStatusesValid(txIDs []driver.TxID, sb common4.Builder)
func (*VaultStore) UpsertStates ¶
func (db *VaultStore) UpsertStates(writes driver.Writes, metaWrites driver.MetaWrites, sb common4.Builder) error
type VaultTables ¶
Click to show internal directories.
Click to hide internal directories.