Documentation ¶
Index ¶
- Constants
- 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
- 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
- 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
- type KeyStoreEx
- type Server
- type Stub
- 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
Constants ¶
View Source
const ClearValueMetaBitMaskCommitted = (^consts.ValueMetaBitMaskCommitted) & 0xff
Variables ¶
This section is empty.
Functions ¶
func RunTestCase ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) RemoveTxnRecord ¶
func (*Client) RollbackKey ¶
func (*Client) UpdateMeta ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func NewDB ¶
func NewDB(getVersionedValues KeyStore, txnRecordStore TxnRecordStore) *DB
func (*DB) ClearWriteIntent ¶
func (*DB) RemoveTxnRecord ¶
func (*DB) RollbackKey ¶
func (*DB) UpdateMeta ¶
type KeyStore ¶
type KeyStore interface { Get(ctx context.Context, key string, version uint64) (types.DBValue, error) // TODO add metaOnly Upsert(ctx context.Context, key string, version uint64, val types.DBValue) error Remove(ctx context.Context, key string, version uint64) error RemoveIf(ctx context.Context, key string, version uint64, pred func(prev types.DBValue) error) error UpdateFlag(ctx context.Context, key string, version uint64, newFlag uint8) error Floor(ctx context.Context, key string, upperVersion uint64) (types.DBValue, uint64, error) Close() error }
type KeyStoreEx ¶
type Server ¶
type Server struct { Port int Done chan struct{} // contains filtered or unexported fields }
type Stub ¶
type Stub struct {
// contains filtered or unexported fields
}
func (*Stub) Get ¶
func (stub *Stub) Get(ctx context.Context, req *kvpb.KVGetRequest) (*kvpb.KVGetResponse, error)
func (*Stub) RemoveTxnRecord ¶
func (stub *Stub) RemoveTxnRecord(ctx context.Context, req *kvpb.KVRemoveTxnRecordRequest) (*kvpb.KVRemoveTxnRecordResponse, error)
func (*Stub) RollbackKey ¶
func (stub *Stub) RollbackKey(ctx context.Context, req *kvpb.KVRollbackKeyRequest) (*kvpb.KVRollbackKeyResponse, error)
func (*Stub) Set ¶
func (stub *Stub) Set(ctx context.Context, req *kvpb.KVSetRequest) (*kvpb.KVSetResponse, error)
func (*Stub) UpdateMeta ¶
func (stub *Stub) UpdateMeta(ctx context.Context, req *kvpb.KVUpdateMetaRequest) (*kvpb.KVUpdateMetaResponse, error)
Click to show internal directories.
Click to hide internal directories.