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) ReadMetrics(id string) *syncer.EarsMetric
- 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)
- func (s *RedisDeltaSyncer) WriteMetrics(id string, metric *syncer.EarsMetric)
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_METRICS = "ears_metrics" 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) ReadMetrics ¶ added in v1.1.2
func (s *RedisDeltaSyncer) ReadMetrics(id string) *syncer.EarsMetric
id should be a unique plugin id
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)
func (*RedisDeltaSyncer) WriteMetrics ¶ added in v1.1.2
func (s *RedisDeltaSyncer) WriteMetrics(id string, metric *syncer.EarsMetric)
id should be a unique plugin id
Click to show internal directories.
Click to hide internal directories.