Documentation ¶
Index ¶
- Constants
- type Snapshot
- type Store
- func (s *Store[T]) Apply(log *raft.Log) interface{}
- func (s *Store[T]) Initialize(ctx context.Context, conf *consensus.Config) (chan struct{}, error)
- func (s *Store[T]) Join(nodeID, address string) error
- func (s *Store[T]) Recieve() (*ds.Message[T], error)
- func (s *Store[T]) Restore(rc io.ReadCloser) error
- func (s *Store[T]) Send(data T) error
- func (s *Store[T]) Snapshot() (raft.FSMSnapshot, error)
- func (s *Store[T]) Stats() map[string]string
- func (s *Store[T]) WaitForNodeToBeLeader(duration time.Duration) error
Constants ¶
View Source
const ( Send = iota Recieve )
Specific operations that can be applied to the store
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot[T any] struct { // contains filtered or unexported fields }
Snapshot is used to create a snapshot of the queue
type Store ¶
type Store[T any] struct { // contains filtered or unexported fields }
func (*Store[T]) Initialize ¶
Initialize is used to initialize the store with the given config
func (*Store[T]) Restore ¶
func (s *Store[T]) Restore(rc io.ReadCloser) error
Restore is used to restore the store from a snapshot
func (*Store[T]) Snapshot ¶
func (s *Store[T]) Snapshot() (raft.FSMSnapshot, error)
Snapshot is used to create a snapshot of the store
Click to show internal directories.
Click to hide internal directories.