Documentation ¶
Index ¶
- func Hash(key []byte) uint32
- type Gate
- func (g *Gate) Close() (err error)
- func (g *Gate) Get(ctx context.Context, key string, opt types.KVCCReadOption) (types.ValueCC, error)
- func (g *Gate) MustRoute(key types.TxnKeyUnion) *Shard
- func (g *Gate) RemoveTxnRecord(ctx context.Context, version uint64, opt types.KVCCRemoveTxnRecordOption) error
- func (g *Gate) RollbackKey(ctx context.Context, key string, version uint64, ...) error
- func (g *Gate) Route(key types.TxnKeyUnion) (*Shard, error)
- func (g *Gate) Set(ctx context.Context, key string, val types.Value, opt types.KVCCWriteOption) error
- func (g *Gate) UpdateMeta(ctx context.Context, key string, version uint64, ...) error
- type ReadOnlyKV
- type Shard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
TODO the routing logic is not the key point of this project, thus here is the simplest implementation. Cannot be used in product.
func (*Gate) RemoveTxnRecord ¶
func (*Gate) RollbackKey ¶
func (*Gate) UpdateMeta ¶
type ReadOnlyKV ¶
type ReadOnlyKV struct {
*Gate
}
Use a gate as a kv server
func NewReadOnlyKV ¶
func NewReadOnlyKV(gate *Gate) *ReadOnlyKV
Click to show internal directories.
Click to hide internal directories.