Versions in this module Expand all Collapse all v1 v1.5.1 May 26, 2023 Changes in this version + const APIKeyPrefix + const EgressPrefix + const IngressPrefix + const NodePrefix + const ParticipantPrefix + const RPCPrefix + const RoomPrefix + const TrackPrefix + const WHIPResourcePrefix + var PromMessageBusCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + func EnableLockTracker() + func GetMimeTypeForAudioCodec(codec livekit.AudioCodec) string + func GetMimeTypeForVideoCodec(codec livekit.VideoCodec) string + func HashedID(id string) string + func LocalNodeID() (string, error) + func MarshalGuid(id T) livekit.GuidBlock + func NewGuid(prefix string) string + func NumMutexes() int + func ParallelExec(vals []T, parallelThreshold, step uint64, fn func(T)) + func RandomSecret() string + func UnmarshalGuid(b livekit.GuidBlock) T + type CPUStats struct + func NewCPUStats(updateCallback func(idle float64)) (*CPUStats, error) + func (c *CPUStats) GetCPUIdle() float64 + func (c *CPUStats) NumCPU() int + func (c *CPUStats) Stop() + type ErrArray struct + func (e *ErrArray) AppendErr(err error) + func (e *ErrArray) ToError() psrpc.Error + type EventEmitter struct + func NewDefaultEventEmitter() *EventEmitter[K, V] + func NewEventEmitter(params EventEmitterParams) *EventEmitter[K, V] + func (e *EventEmitter[K, V]) Emit(k K, v V) + func (e *EventEmitter[K, V]) Observe(k K) EventObserver[V] + func (e *EventEmitter[K, V]) ObservedKeys() []K + type EventEmitterParams struct + Logger logger.Logger + QueueSize int + type EventObserver struct + func NewEventObserver(stopFunc func()) (EventObserver[V], func(v V)) + func (o EventObserver[V]) Events() <-chan V + func (o EventObserver[V]) Stop() + type FlowGraph struct + func NewFlowGraph(n int64) FlowGraph + func (g *FlowGraph) AddEdge(s, t, cap, cost int64) + type Graph struct + func NewGraph() *Graph[K, N, E] + func (g *Graph[K, N, E]) DeleteEdge(src, dst K) + func (g *Graph[K, N, E]) Edge(src, dst K) (p E, ok bool) + func (g *Graph[K, N, E]) InEdges(dst K) map[K]E + func (g *Graph[K, N, E]) InsertEdge(src, dst K, props E) + func (g *Graph[K, N, E]) InsertNode(props N) + func (g *Graph[K, N, E]) Node(id K) N + func (g *Graph[K, N, E]) OutEdges(src K) map[K]E + func (g *Graph[K, N, E]) ShortestPath(src, dst K) ([]N, int64) + func (g *Graph[K, N, E]) Size() int + func (g *Graph[K, N, E]) TopologicalSort() []N + type GraphEdge struct + type GraphEdgeProps interface + Length func() int64 + type GraphNode struct + type GraphNodeProps interface + ID func() K + 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 MinCostMaxFlow struct + func (f *MinCostMaxFlow) ComputeMaxFlow(g FlowGraph, s, t int64) (flow, cost int64) + func (f *MinCostMaxFlow) Flow(s, t int64) int64 + type Mutex struct + func (m *Mutex) Lock() + func (m *Mutex) Unlock() + type ProtoProxy struct + func NewProtoProxy(refreshInterval time.Duration, updateFn func() T) *ProtoProxy[T] + func (p *ProtoProxy[T]) Get() T + func (p *ProtoProxy[T]) MarkDirty(immediate bool) + func (p *ProtoProxy[T]) Stop() + func (p *ProtoProxy[T]) Updated() <-chan struct{} + type PubSub interface + Channel func() <-chan interface{} + Close func() error + Payload func(msg interface{}) []byte + type RWMutex struct + func (m *RWMutex) Lock() + func (m *RWMutex) RLock() + func (m *RWMutex) RUnlock() + func (m *RWMutex) Unlock() + 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 + type StuckLock struct + func ScanTrackedLocks(threshold time.Duration) []*StuckLock + func ScanTrackedLocksI(threshold time.Duration, n int) []*StuckLock + func (d *StuckLock) FirstLockedAtStack() string + func (d *StuckLock) HeldSince() time.Time + func (d *StuckLock) NumGoroutineHeld() int + func (d *StuckLock) NumGoroutineWaiting() int + type TimedVersion struct + func NewTimedVersionFromProto(proto *livekit.TimedVersion) *TimedVersion + func NewTimedVersionFromTime(t time.Time) *TimedVersion + func TimedVersionFromProto(proto *livekit.TimedVersion) TimedVersion + func TimedVersionFromTime(t time.Time) TimedVersion + func (t *TimedVersion) After(other *TimedVersion) bool + func (t *TimedVersion) Compare(other *TimedVersion) int + func (t *TimedVersion) IsZero() bool + func (t *TimedVersion) Load() TimedVersion + func (t *TimedVersion) Store(other *TimedVersion) + func (t *TimedVersion) String() string + func (t *TimedVersion) Time() time.Time + func (t *TimedVersion) ToProto() *livekit.TimedVersion + func (t *TimedVersion) Update(other *TimedVersion) bool + type TimedVersionGenerator interface + New func() *TimedVersion + Next func() TimedVersion + func NewDefaultTimedVersionGenerator() TimedVersionGenerator + type WorkerGroup struct + func (w *WorkerGroup) Go(fn func()) + func (w *WorkerGroup) Wait()