Move callbacks out of messageRouter (#269)

* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
This commit is contained in:
David Colburn
2021-12-17 13:19:23 -08:00
committed by GitHub
parent a06edd885e
commit faa870de3d
82 changed files with 315 additions and 527 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ package telemetry
import (
"context"
livekit "github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/livekit-server/pkg/config"
@@ -24,14 +24,14 @@ type analyticsService struct {
stats livekit.AnalyticsRecorderService_IngestStatsClient
}
func NewAnalyticsService(conf *config.Config, currentNode routing.LocalNode) AnalyticsService {
func NewAnalyticsService(_ *config.Config, currentNode routing.LocalNode) AnalyticsService {
return &analyticsService{
analyticsKey: "", // TODO: conf.AnalyticsKey
nodeID: currentNode.Id,
}
}
func (a *analyticsService) SendStats(ctx context.Context, stats []*livekit.AnalyticsStat) {
func (a *analyticsService) SendStats(_ context.Context, stats []*livekit.AnalyticsStat) {
if a.stats == nil {
return
}
@@ -45,7 +45,7 @@ func (a *analyticsService) SendStats(ctx context.Context, stats []*livekit.Analy
}
}
func (a *analyticsService) SendEvent(ctx context.Context, event *livekit.AnalyticsEvent) {
func (a *analyticsService) SendEvent(_ context.Context, event *livekit.AnalyticsEvent) {
if a.events == nil {
return
}