Documentation
¶
Index ¶
- Constants
- func NewRedisDeltaSyncer(logger *zerolog.Logger, config config.Config) syncer.DeltaSyncer
- type RedisDeltaSyncer
- func (s *RedisDeltaSyncer) GetInstanceCount(ctx context.Context) int
- func (s *RedisDeltaSyncer) PublishSyncRequest(ctx context.Context, tid tenant.Id, itemType string, itemId string, add bool)
- func (s *RedisDeltaSyncer) RegisterLocalSyncer(itemType string, localSyncer syncer.LocalSyncer)
- func (s *RedisDeltaSyncer) StartListeningForSyncRequests()
- func (s *RedisDeltaSyncer) StopListeningForSyncRequests()
- func (s *RedisDeltaSyncer) UnregisterLocalSyncer(itemType string, localSyncer syncer.LocalSyncer)
Constants ¶
View Source
const ( // used by one instance of ears to ask others to sync routing table EARS_REDIS_SYNC_CHANNEL = "ears_sync" // used by one instance of ears to tell all others that it just finished syncing its routing table EARS_REDIS_ACK_CHANNEL = "ears_ack" EARS_REDIS_RETRY_INTERVAL_SECONDS = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewRedisDeltaSyncer ¶
Types ¶
type RedisDeltaSyncer ¶
func (*RedisDeltaSyncer) GetInstanceCount ¶
func (s *RedisDeltaSyncer) GetInstanceCount(ctx context.Context) int
func (*RedisDeltaSyncer) PublishSyncRequest ¶
func (s *RedisDeltaSyncer) PublishSyncRequest(ctx context.Context, tid tenant.Id, itemType string, itemId string, add bool)
PublishSyncRequest asks others to sync their routing tables
func (*RedisDeltaSyncer) RegisterLocalSyncer ¶
func (s *RedisDeltaSyncer) RegisterLocalSyncer(itemType string, localSyncer syncer.LocalSyncer)
func (*RedisDeltaSyncer) StartListeningForSyncRequests ¶
func (s *RedisDeltaSyncer) StartListeningForSyncRequests()
ListenForSyncRequests listens for sync request
func (*RedisDeltaSyncer) StopListeningForSyncRequests ¶
func (s *RedisDeltaSyncer) StopListeningForSyncRequests()
StopListeningForSyncRequests stops listening for sync requests
func (*RedisDeltaSyncer) UnregisterLocalSyncer ¶
func (s *RedisDeltaSyncer) UnregisterLocalSyncer(itemType string, localSyncer syncer.LocalSyncer)
Click to show internal directories.
Click to hide internal directories.