Documentation ¶
Index ¶
- Variables
- type Binlog
- type Config
- type DB
- func (db *DB) BeginTxn() *Txn
- func (db *DB) Close() error
- func (db *DB) Del(ctx context.Context, key []byte) error
- func (db *DB) Get(ctx context.Context, key []byte) ([]byte, error)
- func (db *DB) HDel(ctx context.Context, key []byte, field []byte) (ok bool, err error)
- func (db *DB) HGet(ctx context.Context, key []byte, field []byte) ([]byte, error)
- func (db *DB) HGetAll(ctx context.Context, key []byte) ([][]byte, error)
- func (db *DB) HKeys(ctx context.Context, key []byte) ([][]byte, error)
- func (db *DB) HLen(ctx context.Context, key []byte) (int64, error)
- func (db *DB) HSet(ctx context.Context, key []byte, field []byte, value []byte) (err error)
- func (db *DB) HSetNX(ctx context.Context, key []byte, field []byte, value []byte) (ok bool, err error)
- func (db *DB) HStrLen(ctx context.Context, key []byte, field []byte) (int, error)
- func (db *DB) HVals(ctx context.Context, key []byte) ([][]byte, error)
- func (db *DB) Incr(ctx context.Context, key []byte) (int64, error)
- func (db *DB) Incrby(ctx context.Context, key []byte, increment int64) (int64, error)
- func (db *DB) LIndex(ctx context.Context, key []byte, index int64) ([]byte, error)
- func (db *DB) LLen(ctx context.Context, key []byte) (int64, error)
- func (db *DB) LRange(ctx context.Context, key []byte, start int64, stop int64) ([][]byte, error)
- func (db *DB) Set(ctx context.Context, key []byte, value []byte) error
- func (db *DB) WithTxn(f func(txn *Txn) error) error
- func (db *DB) ZCard(ctx context.Context, key []byte) (int64, error)
- func (db *DB) ZRank(ctx context.Context, key []byte, member []byte) (uint64, error)
- func (db *DB) ZScore(ctx context.Context, key []byte, member []byte) (float64, error)
- type Event
- type EventCommand
- type EventType
- type KeyMutex
- type Options
- type Server
- type Txn
- func (txn *Txn) Begin()
- func (txn *Txn) Commit() error
- func (txn *Txn) Delete(ctx context.Context, ldbKey []byte)
- func (txn *Txn) DeleteWithEvent(ctx context.Context, ldbKey []byte, eventType EventType, eventCmd EventCommand)
- func (txn *Txn) Get(ctx context.Context, ldbKey []byte) ([]byte, error)
- func (txn *Txn) Put(ctx context.Context, ldbKey []byte, value []byte)
- func (txn *Txn) PutWithEvent(ctx context.Context, ldbKey []byte, value []byte, eventType EventType, ...)
- func (txn *Txn) Rollback()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBinlogEventCorrupted = errors.New("ssdb: binlog event corrupted")
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
type Event ¶
type Event struct { Seq uint64 Type EventType Cmd EventCommand Key []byte }
func (*Event) MarshalBinary ¶
func (*Event) UnmarshalBinary ¶
type EventCommand ¶
type EventCommand byte
const ( None EventCommand = 0 StringSet EventCommand = 1 StringDel EventCommand = 2 HashSet EventCommand = 3 HashDel EventCommand = 4 ZSetSet EventCommand = 5 ZSetDel EventCommand = 6 Begin EventCommand = 7 End EventCommand = 8 )
type KeyMutex ¶
type KeyMutex struct {
// contains filtered or unexported fields
}
func NewKeyMutex ¶
func NewKeyMutex() *KeyMutex
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
func (*Txn) DeleteWithEvent ¶
func (*Txn) PutWithEvent ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.