IOInfo service (#1305)

* IOInfo service

* only start if not nil

* use ctx in updateEgressInfo

* updates

* fix merge
This commit is contained in:
David Colburn
2023-01-16 16:26:03 -08:00
committed by GitHub
parent f13f0cb52e
commit a87107a0f3
16 changed files with 440 additions and 536 deletions
+22 -35
View File
@@ -1,4 +1,4 @@
// Code generated by protoc-gen-psrpc v0.2.2, DO NOT EDIT.
// Code generated by protoc-gen-psrpc v0.2.3, DO NOT EDIT.
// source: pkg/service/rpc/egress.proto
package rpc
@@ -119,8 +119,6 @@ type EgressHandlerClient interface {
UpdateStream(context.Context, string, *livekit.UpdateStreamRequest, ...psrpc1.RequestOption) (*livekit.EgressInfo, error)
StopEgress(context.Context, string, *livekit.StopEgressRequest, ...psrpc1.RequestOption) (*livekit.EgressInfo, error)
SubscribeInfoUpdate(context.Context) (psrpc1.Subscription[*livekit.EgressInfo], error)
}
// ==================================
@@ -144,8 +142,6 @@ type EgressHandlerServer interface {
RegisterStopEgressTopic(string) error
DeregisterStopEgressTopic(string)
PublishInfoUpdate(context.Context, *livekit.EgressInfo) error
// Close and wait for pending RPCs to complete
Shutdown()
@@ -181,10 +177,6 @@ func (c *egressHandlerClient) StopEgress(ctx context.Context, topic string, req
return psrpc1.RequestSingle[*livekit.EgressInfo](ctx, c.client, "StopEgress", topic, req, opts...)
}
func (c *egressHandlerClient) SubscribeInfoUpdate(ctx context.Context) (psrpc1.Subscription[*livekit.EgressInfo], error) {
return psrpc1.JoinQueue[*livekit.EgressInfo](ctx, c.client, "InfoUpdate", "")
}
// ====================
// EgressHandler Server
// ====================
@@ -221,10 +213,6 @@ func (s *egressHandlerServer) DeregisterStopEgressTopic(topic string) {
s.rpc.DeregisterHandler("StopEgress", topic)
}
func (s *egressHandlerServer) PublishInfoUpdate(ctx context.Context, msg *livekit.EgressInfo) error {
return s.rpc.Publish(ctx, "InfoUpdate", "", msg)
}
func (s *egressHandlerServer) Shutdown() {
s.rpc.Close(false)
}
@@ -234,26 +222,25 @@ func (s *egressHandlerServer) Kill() {
}
var psrpcFileDescriptor0 = []byte{
// 329 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xd1, 0x4a, 0x02, 0x41,
0x14, 0x65, 0x92, 0x2c, 0x6f, 0x19, 0x32, 0x05, 0xd9, 0xa6, 0x20, 0xfb, 0x14, 0x11, 0xbb, 0x60,
0xf4, 0xd0, 0x63, 0x81, 0x94, 0xd0, 0x93, 0x12, 0x41, 0x2f, 0xb2, 0xce, 0xde, 0x6c, 0x50, 0x77,
0xa6, 0x99, 0xab, 0xd0, 0x27, 0xf4, 0x3b, 0x7e, 0x4d, 0x9f, 0x13, 0xed, 0x8c, 0xb2, 0x18, 0x56,
0x4f, 0xc3, 0x9c, 0x73, 0xef, 0xb9, 0xe7, 0x70, 0x2f, 0x34, 0xf4, 0x78, 0x14, 0x5b, 0x34, 0x73,
0x29, 0x30, 0x36, 0x5a, 0xc4, 0x38, 0x32, 0x68, 0x6d, 0xa4, 0x8d, 0x22, 0xc5, 0x4b, 0x46, 0x8b,
0xa0, 0xaa, 0x34, 0x49, 0x95, 0x79, 0x2c, 0x08, 0x26, 0x72, 0x8e, 0x63, 0x49, 0x03, 0xa3, 0xc5,
0x40, 0x66, 0x84, 0x26, 0x4b, 0x26, 0x9e, 0x3b, 0x5a, 0x72, 0x45, 0x95, 0x70, 0x07, 0xb6, 0x3b,
0x53, 0x4d, 0xef, 0xe1, 0x09, 0x1c, 0x3f, 0x48, 0x4b, 0x37, 0x82, 0xe4, 0x1c, 0x3b, 0x79, 0x49,
0x0f, 0xdf, 0x66, 0x68, 0x29, 0xbc, 0x86, 0xfa, 0x4f, 0xca, 0x6a, 0x95, 0x59, 0xe4, 0x4d, 0x00,
0xa7, 0x37, 0x90, 0xa9, 0xad, 0xb3, 0x56, 0xe9, 0xac, 0xd2, 0xab, 0x38, 0xa4, 0x9b, 0xda, 0xf6,
0x82, 0xc1, 0x81,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