redis

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func NewRedisDeltaSyncer(logger *zerolog.Logger, config config.Config) syncer.DeltaSyncer

Types

type RedisDeltaSyncer

type RedisDeltaSyncer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL