Documentation ¶
Index ¶
- type Store
- func (s *Store) Delete(key string) error
- func (s *Store) Get(key string) (interface{}, error)
- func (s *Store) ObservationCh() chan raft.Observation
- func (s *Store) Open(nodeID string, stateDir string, kvStore string, raftBindAddrPort string, ...) error
- func (s *Store) Set(key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a simple key-value store, where all changes are made via Raft consensus.
func (*Store) ObservationCh ¶
func (s *Store) ObservationCh() chan raft.Observation
ObservationCh retrieves the channel where cluster changes are reported
func (*Store) Open ¶
func (s *Store) Open(nodeID string, stateDir string, kvStore string, raftBindAddrPort string, raftAdvertiseAddrPort string, peers string, logger hclog.Logger) error
Open opens the store. If peers is empty then this node becomes the first node, and therefore leader, of the cluster.
Click to show internal directories.
Click to hide internal directories.