Versions in this module Expand all Collapse all v1 v1.0.3 Sep 24, 2022 v1.0.1 Sep 24, 2022 Changes in this version + const APIKeyPrefix + const EgressPrefix + const IngressPrefix + const NodePrefix + const ParticipantPrefix + const RPCPrefix + const RoomPrefix + const TrackPrefix + var PromMessageBusCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + func HashedID(id string) string + func LocalNodeID() (string, error) + func NewGuid(prefix string) string + func RandomSecret() string + type MessageBus interface + Publish func(ctx context.Context, channel string, msg proto.Message) error + Subscribe func(ctx context.Context, channel string) (PubSub, error) + SubscribeQueue func(ctx context.Context, channel string) (PubSub, error) + func NewRedisMessageBus(rc *redis.Client) MessageBus + type PubSub interface + Channel func() <-chan interface{} + Close func() error + Payload func(msg interface{}) []byte + type RedisMessageBus struct + func (r *RedisMessageBus) Lock(ctx context.Context, key string, expiration time.Duration) (bool, error) + func (r *RedisMessageBus) Publish(ctx context.Context, channel string, msg proto.Message) error + func (r *RedisMessageBus) Subscribe(ctx context.Context, channel string) (PubSub, error) + func (r *RedisMessageBus) SubscribeQueue(ctx context.Context, channel string) (PubSub, error) + type RedisPubSub struct + func (r *RedisPubSub) Channel() <-chan interface{} + func (r *RedisPubSub) Close() error + func (r *RedisPubSub) Payload(msg interface{}) []byte