Versions in this module Expand all Collapse all v0 v0.0.2 Dec 29, 2024 v0.0.1 Dec 28, 2024 Changes in this version + const APIKeyPrefix + const AgentDispatchPrefix + const AgentJobPrefix + const AgentWorkerPrefix + const EgressPrefix + const GuidSize + const IngressPrefix + const MetricsBatchBuilderInvalidTimeSeriesMetricId + const NodePrefix + const ParticipantPrefix + const RPCPrefix + const RTMPResourcePrefix + const RoomPrefix + const SIPCallPrefix + const SIPDispatchRulePrefix + const SIPTrunkPrefix + const TrackPrefix + const URLResourcePrefix + const WHIPResourcePrefix + var ErrAnachronousSample = errors.New("anachronous sample") + var ErrFilteredMetricLabel = errors.New("filtered metric label") + var ErrInvalidMetricLabel = errors.New("invalid metric label") + var ErrInvalidTimeSeriesMetricIndex = errors.New("invalid time series metric index") + var ErrMaxAttemptsReached = errors.New("max attempts reached") + func AggregateRTPStats(statsList []*wirtual.RTPStats, gapHistogramSize int) *wirtual.RTPStats + func CloneProtoSlice[T proto.Message](ms []T) []T + func CloneProto[T proto.Message](m T) T + func CloseFunc[T CloseFuncType](fn T) io.Closer + func DeepCopy[T any](v T) T + func EnableLockTracker() + func ErrorIsOneOf(err error, targets ...error) bool + func FastLogisticFunc(x0, L, k float64) func(x float64) float64 + func GetMimeTypeForAudioCodec(codec wirtual.AudioCodec) string + func GetMimeTypeForVideoCodec(codec wirtual.VideoCodec) string + func HashedID(id string) string + func HedgeCall[T any](ctx context.Context, params HedgeParams[T]) (v T, err error) + func IsConnectionQualityHigher(prev wirtual.ConnectionQuality, curr wirtual.ConnectionQuality) bool + func IsConnectionQualityLower(prev wirtual.ConnectionQuality, curr wirtual.ConnectionQuality) bool + func LocalNodeID() (string, error) + func LogisticFunc(x0, L, k float64) func(x float64) float64 + func MarshalGuid[T wirtual.Guid](id T) wirtual.GuidBlock + func NewGuid(prefix string) string + func NumMutexes() int + func ParallelExec[T any](vals []T, parallelThreshold, step uint64, fn func(T)) + func RandomSecret() string + func Redact(s, name string) string + func RedactIdentifier(identifier string) string + func RedactStreamKey(url string) (string, bool) + func ToggleLockTrackerStackTraces(enable bool) + func UnmarshalGuid[T wirtual.Guid](b wirtual.GuidBlock) T + type Bitmap struct + func NewBitmap[T bitmapNumber](size int) *Bitmap[T] + func (b *Bitmap[T]) Clear(val T) + func (b *Bitmap[T]) ClearRange(min, max T) + func (b *Bitmap[T]) IsSet(val T) bool + func (b *Bitmap[T]) Len() int + func (b *Bitmap[T]) Set(val T) + func (b *Bitmap[T]) SetRange(min, max T) + type Clock interface + Now func() time.Time + Sleep func(time.Duration) + type CloseFuncType interface + type Closers []io.Closer + func CombineClosers(cs ...io.Closer) Closers + func (s *Closers) Close() error + type ConfigBuilder interface + New func() (*T, error) + type ConfigDefaulter interface + InitDefaults func(*T) error + type ConfigObserver struct + func NewConfigObserver[T any](path string, builder ConfigBuilder[T]) (*ConfigObserver[T], *T, error) + func (c *ConfigObserver[T]) Close() + func (c *ConfigObserver[T]) EmitConfigUpdate(conf *T) + func (c *ConfigObserver[T]) Load() *T + func (c *ConfigObserver[T]) Observe(cb func(*T)) func() + type DedupedSlice struct + func NewDedupedSlice[T comparable](maxLen int) *DedupedSlice[T] + func (d *DedupedSlice[T]) Add(val T) bool + func (d *DedupedSlice[T]) Clear() + func (d *DedupedSlice[T]) Get() []T + func (d *DedupedSlice[T]) Has(val T) bool + func (d *DedupedSlice[T]) Len() int + type ErrArray struct + func (e *ErrArray) AppendErr(err error) + func (e *ErrArray) ToError() psrpc.Error + type EventMetric struct + CustomMetricLabel string + EndedAt time.Time + Metadata string + MetricLabel wirtual.MetricLabel + NormalizedEndedAt time.Time + NormalizedStartedAt time.Time + ParticipantIdentity wirtual.ParticipantIdentity + Rid string + StartedAt time.Time + TrackID wirtual.TrackID + type FlowGraph struct + func NewFlowGraph(n int64) FlowGraph + func (g *FlowGraph) AddEdge(s, t, cap, cost int64) + type Graph struct + func NewGraph[K comparable, N GraphNodeProps[K], E GraphEdgeProps]() *Graph[K, N, E] + func (g *Graph[K, N, E]) DeleteEdge(src, dst K) + func (g *Graph[K, N, E]) DeleteNode(id K) + func (g *Graph[K, N, E]) Edge(src, dst K) (p E) + func (g *Graph[K, N, E]) HasEdge(src, dst K) bool + func (g *Graph[K, N, E]) HasNode(id K) 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) (props N) + func (g *Graph[K, N, E]) NodeIDs() []K + 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 HedgeParams struct + Func func(context.Context) (T, error) + IsRecoverable func(err error) bool + MaxAttempts int + RetryDelay time.Duration + Timeout time.Duration + type KillableService interface + Kill func() + type LatencyAggregate struct + func NewLatencyAggregate(interval, windowLength time.Duration) *LatencyAggregate + func (a *LatencyAggregate) Get(ts time.Duration) (Welford, bool) + func (a *LatencyAggregate) MarshalLogObject(e zapcore.ObjectEncoder) error + func (a *LatencyAggregate) Summarize() Welford + func (a *LatencyAggregate) SummarizeLast(d time.Duration) Welford + func (a *LatencyAggregate) Update(ts time.Duration, v float64) + type LeakyBucket struct + func NewLeakyBucket(rateLimit int, slack int, clock Clock) *LeakyBucket + func (lb *LeakyBucket) Take() time.Time + func (lb *LeakyBucket) Update(rateLimit int, slack int) + type MetricLabelRange struct + EndInclusive wirtual.MetricLabel + StartInclusive wirtual.MetricLabel + type MetricRestrictedLabels struct + LabelRanges []MetricLabelRange + ParticipantIdentity wirtual.ParticipantIdentity + type MetricSample struct + At time.Time + NormalizedAt time.Time + Value float32 + type MetricsBatchBuilder struct + func NewMetricsBatchBuilder() *MetricsBatchBuilder + func (m *MetricsBatchBuilder) AddEventMetric(em EventMetric) error + func (m *MetricsBatchBuilder) AddMetricSamplesToTimeSeriesMetric(timeSeriesMetricIdx int, samples []MetricSample) error + func (m *MetricsBatchBuilder) AddTimeSeriesMetric(tsm TimeSeriesMetric) (int, error) + func (m *MetricsBatchBuilder) IsEmpty() bool + func (m *MetricsBatchBuilder) Merge(other *wirtual.MetricsBatch) + func (m *MetricsBatchBuilder) SetRestrictedLabels(mrl MetricRestrictedLabels) + func (m *MetricsBatchBuilder) SetTime(at time.Time, normalizedAt time.Time) + func (m *MetricsBatchBuilder) ToProto() *wirtual.MetricsBatch + type MinCostMaxFlow struct + func (f *MinCostMaxFlow) ComputeMaxFlow(g FlowGraph, s, t int64) (flow, cost int64) + func (f *MinCostMaxFlow) Flow(s, t int64) int64 + type MultitonService struct + func (s *MultitonService[K]) Kill() + func (s *MultitonService[K]) Replace(k K, v KillableService) func() + type Mutex struct + func (m *Mutex) Lock() + func (m *Mutex) Unlock() + type Promise struct + Err error + Result T + func GoPromise[T any](f func() (T, error)) *Promise[T] + func NewPromise[T any]() *Promise[T] + func NewResolvedPromise[T any](result T, err error) *Promise[T] + func (p *Promise[T]) Done() <-chan struct{} + func (p *Promise[T]) Resolve(result T, err error) + func (p *Promise[T]) Resolved() bool + type ProtoProxy struct + func NewProtoProxy[T proto.Message](refreshInterval time.Duration, updateFn func() T) *ProtoProxy[T] + func (p *ProtoProxy[T]) Get() T + func (p *ProtoProxy[T]) MarkDirty(immediate bool) <-chan struct{} + func (p *ProtoProxy[T]) Stop() + func (p *ProtoProxy[T]) Updated() <-chan struct{} + type RWMutex struct + func (m *RWMutex) Lock() + func (m *RWMutex) RLock() + func (m *RWMutex) RUnlock() + func (m *RWMutex) Unlock() + type SimpleGraphEdge struct + func (e SimpleGraphEdge) Length() int64 + type SimulatedClock struct + 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 SystemClock struct + func (SystemClock) Now() time.Time + func (SystemClock) Sleep(d time.Duration) + type TimeSeriesMetric struct + CustomMetricLabel string + MetricLabel wirtual.MetricLabel + ParticipantIdentity wirtual.ParticipantIdentity + Rid string + Samples []MetricSample + TrackID wirtual.TrackID + type TimedAggregator struct + func NewTimedAggregator[T timedAggregatorNumber](params TimedAggregatorParams) *TimedAggregator[T] + func (t *TimedAggregator[T]) AddSample(val T) error + func (t *TimedAggregator[T]) AddSampleAt(val T, at time.Time) error + func (t *TimedAggregator[T]) GetAggregate() (T, time.Duration) + func (t *TimedAggregator[T]) GetAggregateAndRestartAt(at time.Time) (T, time.Duration, error) + func (t *TimedAggregator[T]) GetAggregateAt(at time.Time) (T, time.Duration, error) + func (t *TimedAggregator[T]) GetAverage() float64 + func (t *TimedAggregator[T]) GetAverageAndRestartAt(at time.Time) (float64, error) + func (t *TimedAggregator[T]) GetAverageAt(at time.Time) (float64, error) + func (t *TimedAggregator[T]) Reset() + func (t *TimedAggregator[T]) Restart() + func (t *TimedAggregator[T]) RestartAt(at time.Time) + type TimedAggregatorParams struct + CapNegativeValues bool + type TimedVersion uint64 + func TimedVersionFromProto(proto *wirtual.TimedVersion) TimedVersion + func TimedVersionFromTime(t time.Time) TimedVersion + func (t *TimedVersion) Downgrade(other TimedVersion) bool + func (t *TimedVersion) Scan(src interface{}) (err error) + func (t *TimedVersion) Store(other TimedVersion) + func (t *TimedVersion) Update(other TimedVersion) bool + func (t *TimedVersion) Upgrade(other TimedVersion) bool + func (t TimedVersion) After(other TimedVersion) bool + func (t TimedVersion) Compare(other TimedVersion) int + func (t TimedVersion) GormDataType() string + func (t TimedVersion) IsZero() bool + func (t TimedVersion) Load() TimedVersion + func (t TimedVersion) String() string + func (t TimedVersion) Time() time.Time + func (t TimedVersion) ToProto() *wirtual.TimedVersion + func (t TimedVersion) Value() (driver.Value, error) + type TimedVersionGenerator interface + Next func() TimedVersion + func NewDefaultTimedVersionGenerator() TimedVersionGenerator + type TimeoutQueue struct + func (q *TimeoutQueue[T]) IterateAfter(timeout time.Duration) TimeoutQueueIterator[T] + func (q *TimeoutQueue[T]) IterateRemoveAfter(timeout time.Duration) TimeoutQueueIterator[T] + func (q *TimeoutQueue[T]) Remove(i *TimeoutQueueItem[T]) + func (q *TimeoutQueue[T]) Reset(i *TimeoutQueueItem[T]) bool + type TimeoutQueueItem struct + Value T + type TimeoutQueueIterator struct + func (i *TimeoutQueueIterator[T]) Item() *TimeoutQueueItem[T] + func (i *TimeoutQueueIterator[T]) Next() bool + type Welford struct + func WelfordMerge(ws ...Welford) Welford + func (w *Welford) Reset() + func (w *Welford) Update(v float64) + func (w Welford) Count() float64 + func (w Welford) Mean() float64 + func (w Welford) StdDev() float64 + func (w Welford) Value() (mean, variance, sampleVariance float64) + func (w Welford) Variance() float64 + type WorkerGroup struct + func (w *WorkerGroup) Go(fn func()) + func (w *WorkerGroup) Wait()