Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster interface {
Broadcast(ctx context.Context, data []byte) error
Next(ctx context.Context) ([]byte, error)
}
Broadcaster interface for CRDT synchronization
type CRDTRouter ¶
type CRDTStatsStore ¶
type CRDTStatsStore struct {
// contains filtered or unexported fields
}
CRDTStatsStore manages CRDT-based tweet statistics
func NewCRDTStatsStore ¶
func NewCRDTStatsStore( ctx context.Context, broadcaster Broadcaster, datastore CRDTStorer, node host.Host, router CRDTRouter, ) (*CRDTStatsStore, error)
NewCRDTStatsStore creates a new CRDT-based statistics store
func (*CRDTStatsStore) GetAggregatedStat ¶
func (s *CRDTStatsStore) GetAggregatedStat(key ds.Key) (uint64, error)
GetAggregatedStat gets the aggregated count for a specific statistic across all nodes
type CRDTStorer ¶
type GossipBroadcaster ¶
type GossipBroadcaster struct {
// contains filtered or unexported fields
}
GossipBroadcaster adapts Gossip to CRDT Broadcaster interface
func NewGossipBroadcaster ¶
func NewGossipBroadcaster(ctx context.Context, gossip GossipPubSuber) (*GossipBroadcaster, error)
NewGossipBroadcaster creates a new Gossip-based broadcaster for CRDT
func (*GossipBroadcaster) Broadcast ¶
func (gb *GossipBroadcaster) Broadcast(_ context.Context, data []byte) error
Broadcast sends data via Gossip
func (*GossipBroadcaster) Next ¶
func (gb *GossipBroadcaster) Next(ctx context.Context) ([]byte, error)
Next receives broadcasted data
func (*GossipBroadcaster) Receive ¶
func (gb *GossipBroadcaster) Receive(data []byte)
Receive is called by Gossip subscription handler to deliver data
Click to show internal directories.
Click to hide internal directories.