Versions in this module Expand all Collapse all v1 v1.0.0 Apr 5, 2021 Changes in this version + const ClearValueMetaBitMaskCommitted + func RunTestCase(t types.T, rounds int, newDB func() (*DB, error), ...) (b bool) + func TestCausalConsistency(t types.T, db *DB) (b bool) + func TestConcurrentClearWriteIntent(t types.T, db *DB) (b bool) + func TestConcurrentClearWriteIntentRemoveVersion(t types.T, db *DB) (b bool) + func TestConcurrentRemoveVersion(t types.T, db *DB) (b bool) + func TestDB(t types.T, db *DB) (b bool) + type Client struct + func NewClient(serverAddr string) (*Client, error) + func (c *Client) Close() error + func (c *Client) Get(ctx context.Context, key string, opt types.KVReadOption) (types.Value, error) + func (c *Client) RemoveTxnRecord(ctx context.Context, version uint64) error + func (c *Client) RollbackKey(ctx context.Context, key string, version uint64) error + func (c *Client) Set(ctx context.Context, key string, val types.Value, opt types.KVWriteOption) error + func (c *Client) UpdateMeta(ctx context.Context, key string, version uint64, opt types.KVUpdateMetaOption) error + type DB struct + func NewDB(getVersionedValues KeyStore, txnRecordStore TxnRecordStore) *DB + func (db *DB) ClearWriteIntent(ctx context.Context, key string, version uint64) error + func (db *DB) Close() error + func (db *DB) Get(ctx context.Context, key string, opt types.KVReadOption) (types.Value, error) + func (db *DB) RemoveTxnRecord(ctx context.Context, version uint64) error + func (db *DB) RollbackKey(ctx context.Context, key string, version uint64) error + func (db *DB) Set(ctx context.Context, key string, val types.Value, opt types.KVWriteOption) error + func (db *DB) UpdateMeta(ctx context.Context, key string, version uint64, opt types.KVUpdateMetaOption) error + type KeyStore interface + Close func() error + Floor func(ctx context.Context, key string, upperVersion uint64) (types.DBValue, uint64, error) + Get func(ctx context.Context, key string, version uint64) (types.DBValue, error) + Remove func(ctx context.Context, key string, version uint64) error + RemoveIf func(ctx context.Context, key string, version uint64, ...) error + UpdateFlag func(ctx context.Context, key string, version uint64, newFlag uint8) error + Upsert func(ctx context.Context, key string, version uint64, val types.DBValue) error + type KeyStoreEx interface + ReadModifyWriteKey func(ctx context.Context, key string, version uint64, ...) error + type Server struct + Done chan struct{} + Port int + func NewServer(port int, kv types.KV) Server + func (s *Server) Close() error + func (s *Server) Start() error + type Stub struct + func (stub *Stub) Get(ctx context.Context, req *kvpb.KVGetRequest) (*kvpb.KVGetResponse, error) + func (stub *Stub) RemoveTxnRecord(ctx context.Context, req *kvpb.KVRemoveTxnRecordRequest) (*kvpb.KVRemoveTxnRecordResponse, error) + func (stub *Stub) RollbackKey(ctx context.Context, req *kvpb.KVRollbackKeyRequest) (*kvpb.KVRollbackKeyResponse, error) + func (stub *Stub) Set(ctx context.Context, req *kvpb.KVSetRequest) (*kvpb.KVSetResponse, error) + func (stub *Stub) UpdateMeta(ctx context.Context, req *kvpb.KVUpdateMetaRequest) (*kvpb.KVUpdateMetaResponse, error) + type TxnRecordStore interface + Close func() error + GetTxnRecord func(ctx context.Context, version uint64) (types.DBValue, error) + RemoveTxnRecord func(ctx context.Context, version uint64) error + UpsertTxnRecord func(ctx context.Context, version uint64, val types.DBValue) error