Documentation ¶
Index ¶
- type Store
- func (s *Store) DeleteKey(source string, key string) error
- func (s *Store) DeleteSource(source string) error
- func (s *Store) Get(source string, key string) []byte
- func (s *Store) GetKeys(source string) ([]string, error)
- func (s *Store) GetSources() ([]string, error)
- func (s *Store) IsLeader() bool
- func (s *Store) Join(addr string) error
- func (s *Store) Leader() string
- func (s *Store) Open(startAsLeader bool) error
- func (s *Store) Set(source string, key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { RaftBindAddr string RaftDir string PublishCallback func(source, key string, value []byte) // contains filtered or unexported fields }
Store is a collection of key-value stores, where all changes are made via Raft consensus
func (*Store) DeleteSource ¶
DeleteSource deletes the given source in storage
func (*Store) GetSources ¶
GetSources returns a list of sources found in storage
func (*Store) IsLeader ¶
IsLeader indicates whether this store is currently the leader of the cluster
func (*Store) Join ¶
Join the node located at addr to this store. The node must be ready to respond to raft communications
func (*Store) Leader ¶
Leader returns the address of the cluster leader, or an empty string if unknown
Click to show internal directories.
Click to hide internal directories.