Separate egress/ingress storage (#855)

This commit is contained in:
David Colburn
2022-07-28 17:01:33 -05:00
committed by GitHub
parent 7a2eac8e86
commit 0ab4379c5c
10 changed files with 982 additions and 1734 deletions
+12
View File
@@ -42,6 +42,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
telemetry.NewAnalyticsService,
telemetry.NewTelemetryService,
egress.NewRedisRPCClient,
getEgressStore,
NewEgressService,
NewRoomAllocator,
NewRoomService,
@@ -165,6 +166,17 @@ func createStore(rc *redis.Client) ObjectStore {
return NewLocalStore()
}
func getEgressStore(s ObjectStore) EgressStore {
switch store := s.(type) {
case *RedisStore:
return store
case *LocalStore:
return store
default:
return nil
}
}
func createClientConfiguration() clientconfiguration.ClientConfigurationManager {
return clientconfiguration.NewStaticClientConfigurationManager(clientconfiguration.StaticConfigurations)
}