Ingress psrpc (#1295)

* add ingress psrpc codegen

* use psrpc for ingress

* merge entity/info update psrpc services

* split update/delete ingress methods

* add race helper test

* add race context cancel test

* sync race result with mutex
This commit is contained in:
Paul Wells
2023-01-12 11:00:43 -08:00
committed by GitHub
parent 81fb1c5ef0
commit a052ebd644
16 changed files with 1030 additions and 90 deletions
+9
View File
@@ -51,6 +51,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
NewEgressLauncher,
NewEgressService,
ingress.NewRedisRPC,
getIngressClient,
getIngressStore,
getIngressConfig,
getIngressRPCClient,
@@ -158,6 +159,14 @@ func getEgressStore(s ObjectStore) EgressStore {
}
}
func getIngressClient(conf *config.Config, nodeID livekit.NodeID, bus psrpc.MessageBus) (rpc.IngressClient, error) {
if conf.Ingress.UsePsRPC {
return rpc.NewIngressClient(nodeID, bus)
}
return nil, nil
}
func getIngressStore(s ObjectStore) IngressStore {
switch store := s.(type) {
case *RedisStore: