Documentation ¶
Index ¶
- Constants
- Variables
- func ReversedBucket() []string
- func ReversedIndexName() []string
- type Action
- type Command
- type Coordinator
- func (coordinator *Coordinator) Leader() *memberlist.Node
- func (coordinator *Coordinator) Nodes() []string
- func (coordinator *Coordinator) NotifyJoin(node *memberlist.Node)
- func (coordinator *Coordinator) NotifyLeave(node *memberlist.Node)
- func (coordinator *Coordinator) NotifyMerge(peers []*memberlist.Node) error
- func (coordinator *Coordinator) NotifyUpdate(node *memberlist.Node)
- func (coordinator *Coordinator) Version() string
- type Hash
- type Hook
- type Meta
- type Role
- type SearchHook
- type Storage
- func (s *Storage) BatchDel(rows []Row) error
- func (s *Storage) BatchSet(rows []Row, hook Hook) error
- func (s *Storage) CountIndex(index string, predicate SearchHook) int
- func (s *Storage) Del(key string) error
- func (s *Storage) Get(k string) (v string, ttl time.Duration, err error)
- func (s *Storage) Indexes() []VersionedIndex
- func (s *Storage) Persist(cmd Command, hook Hook) error
- func (s *Storage) ScanIndex(index string, predicate SearchHook) []Row
- func (s *Storage) ScanIndexStream(index string, criteria *Criteria, ch chan<- Row, predicate SearchHook)
- func (s *Storage) Set(k, v string, ttl time.Duration, hook Hook) error
- func (s *Storage) Ttl(k string) (time.Duration, error)
- type VersionedIndex
Constants ¶
View Source
const ( IndexIndexName = "_meta_" IndexKeyPrefix = "_idx_" ClusterStateIndexName = "_state_" ClusterStateKeyPrefix = "_cst_" )
Variables ¶
View Source
var Logger *log.Logger
Functions ¶
func ReversedBucket ¶
func ReversedBucket() []string
func ReversedIndexName ¶
func ReversedIndexName() []string
Types ¶
type Command ¶
type Coordinator ¶
type Coordinator struct { *memberlist.Memberlist *memberlist.TransmitLimitedQueue *consistent.Consistent NodeEvt chan memberlist.NodeEvent Meta }
func NewCoordinate ¶
func NewCoordinate(cfg *memberlist.Config, meta Meta) (*Coordinator, error)
func (*Coordinator) Leader ¶
func (coordinator *Coordinator) Leader() *memberlist.Node
func (*Coordinator) Nodes ¶
func (coordinator *Coordinator) Nodes() []string
func (*Coordinator) NotifyJoin ¶
func (coordinator *Coordinator) NotifyJoin(node *memberlist.Node)
func (*Coordinator) NotifyLeave ¶
func (coordinator *Coordinator) NotifyLeave(node *memberlist.Node)
func (*Coordinator) NotifyMerge ¶
func (coordinator *Coordinator) NotifyMerge(peers []*memberlist.Node) error
func (*Coordinator) NotifyUpdate ¶
func (coordinator *Coordinator) NotifyUpdate(node *memberlist.Node)
func (*Coordinator) Version ¶
func (coordinator *Coordinator) Version() string
type SearchHook ¶ added in v0.1.2
type Storage ¶
func NewStorage ¶
func (*Storage) CountIndex ¶ added in v0.1.2
func (s *Storage) CountIndex(index string, predicate SearchHook) int
func (*Storage) Indexes ¶
func (s *Storage) Indexes() []VersionedIndex
func (*Storage) ScanIndex ¶
func (s *Storage) ScanIndex(index string, predicate SearchHook) []Row
func (*Storage) ScanIndexStream ¶
func (s *Storage) ScanIndexStream(index string, criteria *Criteria, ch chan<- Row, predicate SearchHook)
type VersionedIndex ¶ added in v0.1.2
type VersionedIndex struct { Index Version string }
Click to show internal directories.
Click to hide internal directories.