Versions in this module Expand all Collapse all v1 v1.2.1 Nov 30, 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 CPUStats struct + func NewCPUStats(updateCallback func(idle float64)) (*CPUStats, error) + func (c *CPUStats) GetCPUIdle() float64 + func (c *CPUStats) Stop() + 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.UniversalClient) 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