Versions in this module Expand all Collapse all v1 v1.43.0 Apr 30, 2026 Changes in this version + var ErrRejected = errors.New("replication: frame rejected by quorum") + var ErrTimeout = errors.New("replication: consensus timeout") + type Decision uint8 + const DecisionAccept + const DecisionReject + const DecisionTimeout + const DecisionUndecided + type Frame struct + Key string + Namespace string + Op string + OrgID string + Seq uint64 + Value []byte + func (f Frame) FrameKey() []byte + type Handler func(ctx context.Context, f Frame) error + type LocalReplicator struct + func NewLocal() *LocalReplicator + func (r *LocalReplicator) Close() error + func (r *LocalReplicator) Propose(ctx context.Context, f Frame) (Decision, error) + func (r *LocalReplicator) Stats() (accepted, rejected uint64) + func (r *LocalReplicator) Subscribe(h Handler) + type MemoryHub struct + func NewMemoryHub() *MemoryHub + func (h *MemoryHub) Connect(id string) *MemoryTransport + type MemoryTransport struct + func (t *MemoryTransport) Broadcast(_ context.Context, kind string, payload []byte) error + func (t *MemoryTransport) LocalID() string + func (t *MemoryTransport) OnReceive(kind string, h func([]byte) error) + func (t *MemoryTransport) Validators() []string + type QuasarConfig struct + NodeID string + ProposeWait time.Duration + Transport Transport + Validators []string + WitnessAfter time.Duration + type QuasarReplicator struct + func NewQuasar(ctx context.Context, cfg QuasarConfig) (*QuasarReplicator, error) + func (r *QuasarReplicator) Close() error + func (r *QuasarReplicator) Propose(ctx context.Context, f Frame) (Decision, error) + func (r *QuasarReplicator) Stats() (accepted, rejected, timeouts uint64) + func (r *QuasarReplicator) Subscribe(h Handler) + type Replicator interface + Close func() error + Propose func(ctx context.Context, frame Frame) (Decision, error) + Subscribe func(h Handler) + type Transport interface + Broadcast func(ctx context.Context, kind string, payload []byte) error + LocalID func() string + OnReceive func(kind string, h func(payload []byte) error) + Validators func() []string