Documentation ¶
Index ¶
- Variables
- func Factory(loader func(v interface{}) error) (kvdb.Driver, error)
- type Config
- type Driver
- func (d *Driver) Close() error
- func (d *Driver) Delete(key []byte) error
- func (d *Driver) DeleteCounter(key []byte) error
- func (d *Driver) Features() kvdb.Feature
- func (d *Driver) Get(key []byte) ([]byte, error)
- func (d *Driver) GetCounter(key []byte) (int64, error)
- func (d *Driver) IncreaseCounter(key []byte, incr int64) (int64, error)
- func (d *Driver) IncreaseCounterWithTTL(key []byte, incr int64, ttlInSecond int64) (int64, error)
- func (d *Driver) Insert(key []byte, value []byte) (bool, error)
- func (d *Driver) InsertWithTTL(key []byte, value []byte, ttlInSecond int64) (bool, error)
- func (d *Driver) Set(key []byte, value []byte) error
- func (d *Driver) SetCounter(key []byte, value int64) error
- func (d *Driver) SetCounterWithTTL(key []byte, value int64, ttlInSecond int64) error
- func (d *Driver) SetWithTTL(key []byte, value []byte, ttlInSecond int64) error
- func (d *Driver) Update(key []byte, value []byte) (bool, error)
- func (d *Driver) UpdateWithTTL(key []byte, value []byte, ttlInSecond int64) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var FullFeatures = kvdb.FeatureStore | kvdb.FeatureInsert | kvdb.FeatureUpdate | kvdb.FeatureCounter | kvdb.FeatureTTLStore | kvdb.FeatureTTLInsert | kvdb.FeatureTTLUpdate | kvdb.FeatureTTLCounter
var NoMutliFeatures = kvdb.FeatureStore | kvdb.FeatureInsert | kvdb.FeatureUpdate | kvdb.FeatureCounter | kvdb.FeatureTTLStore | kvdb.FeatureTTLInsert | kvdb.FeatureTTLUpdate
Functions ¶
Types ¶
type Driver ¶
func (*Driver) DeleteCounter ¶
DeleteCounter delete counter value with given key
func (*Driver) GetCounter ¶
GetCounter get counter value with given key Value not existed coutn as 0.
func (*Driver) IncreaseCounter ¶
IncreaseCounter increace counter value with given key and increasement. Value not existed coutn as 0. Return final value and any error if raised.
func (*Driver) IncreaseCounterWithTTL ¶
IncreaseCounterWithTTL increace counter value with given key ,increasement,and ttl in second Value not existed coutn as 0. Return final value and any error if raised.
func (*Driver) Insert ¶
Insert insert value with given key. Insert will fail if data with given key exists. Return if operation success and any error if raised
func (*Driver) InsertWithTTL ¶
InsertWithTTL insert value with given key and ttl in second. Insert will fail if data with given key exists. Return if operation success and any error if raised
func (*Driver) SetCounter ¶
SetCounter set counter value with given key
func (*Driver) SetCounterWithTTL ¶
SetCounterWithTTL set counter value with given key and ttl in second
func (*Driver) SetWithTTL ¶
SetWithTTL set value by given key and ttl in second