Documentation ¶
Index ¶
- Constants
- func NewLru(lruCache *lru.TwoQueueCache, address string, peers []string) chan<- Notice
- func NewLruClient(address string) chan<- Notice
- type KvData
- type KvScanData
- type Lru
- type LruClient
- type Notice
- type NoticeType
- type Tikv
- func (s *Tikv) BatchDelete(keys [][]byte)
- func (s *Tikv) BatchPut(data map[string][]byte, reTokens ...string)
- func (s *Tikv) Close() error
- func (s *Tikv) Delete(k []byte) error
- func (s *Tikv) Get(k []byte) (b []byte, err error)
- func (s *Tikv) Has(k []byte) (bool, error)
- func (s *Tikv) PreLike(key []byte) (keys [][]byte, values [][]byte, err error)
- func (s *Tikv) Set(k []byte, v []byte) error
Constants ¶
const DefaultLruSize = 100000
Variables ¶
This section is empty.
Functions ¶
func NewLruClient ¶
Types ¶
type KvScanData ¶
type Notice ¶
type Notice struct { Type NoticeType Data interface{} }
type Tikv ¶
type Tikv struct {
// contains filtered or unexported fields
}
Bolt bolt store struct
func (*Tikv) BatchDelete ¶
func (*Tikv) Close ¶
Close releases all database resources. All transactions must be closed before closing the database.
func (*Tikv) Delete ¶
Delete deletes a key. Exposing this so that user does not have to specify the Entry directly.
func (*Tikv) Get ¶
Get executes a function within the context of a managed read-only transaction. Any error that is returned from the function is returned from the View() method.
func (*Tikv) Set ¶
Set executes a function within the context of a read-write managed transaction. If no error is returned from the function then the transaction is committed. If an error is returned then the entire transaction is rolled back. Any error that is returned from the function or returned from the commit is returned from the Update() method.