Documentation
¶
Index ¶
- Constants
- Variables
- type KeyValue
- type SequenceChunk
- type Store
- func (store *Store) ChangeKey(currentKey []byte, newKey []byte) error
- func (store *Store) Close()
- func (store *Store) Delete(key []byte) (err error)
- func (store *Store) Get(key []byte) (value []byte, err error)
- func (store *Store) GetKeyOnlyPrefix(prefix []byte) (keys [][]byte, err error)
- func (store *Store) GetPrefix(prefix []byte) (values []KeyValue, err error)
- func (store *Store) GetPrefixWithPredicate(prefix []byte, predicate func(kv KeyValue) (bool, error)) (kv KeyValue, found bool, err error)
- func (store *Store) IsLeader() bool
- func (store *Store) ListenAddr() string
- func (store *Store) NextSequenceValueById(sequenceName string) (*uint64, error)
- func (store *Store) NodeID() uint64
- func (store *Store) SequenceIndexById(sequenceName string) (uint64, error)
- func (store *Store) Set(key, value []byte) (err error)
Constants ¶
View Source
const ( SequenceRangeSize = 1000 SequencePartitions = 5 SequencePreretrieve = 50 )
Variables ¶
View Source
var (
ErrNotLeader = errors.New("the current node is not the leader and cannot fulfill your request")
)
Functions ¶
This section is empty.
Types ¶
type SequenceChunk ¶
type SequenceChunk struct {
Store
// contains filtered or unexported fields
}
func (*SequenceChunk) GetSequenceIndex ¶
func (sequence *SequenceChunk) GetSequenceIndex() uint64
func (*SequenceChunk) Next ¶
func (sequence *SequenceChunk) Next() (*uint64, error)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func CreateStore ¶
Creates and possibly joins a cluster.
func (*Store) GetKeyOnlyPrefix ¶
func (*Store) GetPrefixWithPredicate ¶
func (*Store) ListenAddr ¶
func (*Store) NextSequenceValueById ¶
func (*Store) SequenceIndexById ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.