From 3faf49fc417a0b01c4ed3a997ea688442a834d4f Mon Sep 17 00:00:00 2001 From: Mahdi <80265960+Mahdi-zarei@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:32:26 +0330 Subject: [PATCH] =?UTF-8?q?feat:=20allow=20for=20custom=20URLNotifier=20an?= =?UTF-8?q?d=20add=20batched=20events=20protobuf=20de=E2=80=A6=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: allow for custom URLNotifier and add batched events protobuf definition * feat: Implement batch sender --- infra/link.pb.go | 16 ++-- infra/link_grpc.pb.go | 18 ++-- livekit/livekit_agent.pb.go | 52 +++++------ livekit/livekit_analytics.pb.go | 28 +++--- livekit/livekit_egress.pb.go | 88 +++++++++--------- livekit/livekit_ingress.pb.go | 42 ++++----- livekit/livekit_internal.pb.go | 18 ++-- livekit/livekit_models.pb.go | 60 ++++++------ livekit/livekit_room.pb.go | 44 ++++----- livekit/livekit_rtc.pb.go | 92 +++++++++---------- livekit/livekit_sip.pb.go | 38 ++++---- livekit/livekit_webhook.pb.go | 157 +++++++++++++++++++++++++------- protobufs/livekit_webhook.proto | 8 ++ rpc/agent.pb.go | 10 +- rpc/analytics.pb.go | 6 +- rpc/analytics_grpc.pb.go | 29 +++--- rpc/egress.pb.go | 14 +-- rpc/ingress.pb.go | 18 ++-- rpc/io.pb.go | 24 ++--- rpc/keepalive.pb.go | 8 +- rpc/participant.pb.go | 6 +- rpc/room.pb.go | 6 +- rpc/signal.pb.go | 10 +- rpc/sip.pb.go | 10 +- webhook/batch_url_notifier.go | 155 +++++++++++++++++++++++++++++++ webhook/notifier.go | 23 ++++- webhook/url_notifier.go | 22 +++-- webhook/verifier.go | 18 ++++ webhook/webhook_test.go | 45 ++++++++- 29 files changed, 699 insertions(+), 366 deletions(-) create mode 100644 webhook/batch_url_notifier.go diff --git a/infra/link.pb.go b/infra/link.pb.go index c53e392ed..26df7f673 100644 --- a/infra/link.pb.go +++ b/infra/link.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: infra/link.proto package infra @@ -375,7 +375,7 @@ func file_infra_link_proto_rawDescGZIP() []byte { } var file_infra_link_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_infra_link_proto_goTypes = []any{ +var file_infra_link_proto_goTypes = []interface{}{ (*WatchLocalLinksRequest)(nil), // 0: rpc.WatchLocalLinksRequest (*WatchLocalLinksResponse)(nil), // 1: rpc.WatchLocalLinksResponse (*SimulateLinkStateRequest)(nil), // 2: rpc.SimulateLinkStateRequest @@ -401,7 +401,7 @@ func file_infra_link_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_infra_link_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_infra_link_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WatchLocalLinksRequest); i { case 0: return &v.state @@ -413,7 +413,7 @@ func file_infra_link_proto_init() { return nil } } - file_infra_link_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_infra_link_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WatchLocalLinksResponse); i { case 0: return &v.state @@ -425,7 +425,7 @@ func file_infra_link_proto_init() { return nil } } - file_infra_link_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_infra_link_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulateLinkStateRequest); i { case 0: return &v.state @@ -437,7 +437,7 @@ func file_infra_link_proto_init() { return nil } } - file_infra_link_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_infra_link_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulateLinkStateResponse); i { case 0: return &v.state @@ -450,7 +450,7 @@ func file_infra_link_proto_init() { } } } - file_infra_link_proto_msgTypes[2].OneofWrappers = []any{} + file_infra_link_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/infra/link_grpc.pb.go b/infra/link_grpc.pb.go index cd17cd1fa..832b0d43c 100644 --- a/infra/link_grpc.pb.go +++ b/infra/link_grpc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.3 // source: infra/link.proto package infra @@ -29,8 +29,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( Link_WatchLocalLinks_FullMethodName = "/rpc.Link/WatchLocalLinks" @@ -54,12 +54,11 @@ func NewLinkClient(cc grpc.ClientConnInterface) LinkClient { } func (c *linkClient) WatchLocalLinks(ctx context.Context, in *WatchLocalLinksRequest, opts ...grpc.CallOption) (Link_WatchLocalLinksClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Link_ServiceDesc.Streams[0], Link_WatchLocalLinks_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &Link_ServiceDesc.Streams[0], Link_WatchLocalLinks_FullMethodName, opts...) if err != nil { return nil, err } - x := &linkWatchLocalLinksClient{ClientStream: stream} + x := &linkWatchLocalLinksClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -87,9 +86,8 @@ func (x *linkWatchLocalLinksClient) Recv() (*WatchLocalLinksResponse, error) { } func (c *linkClient) SimulateLinkState(ctx context.Context, in *SimulateLinkStateRequest, opts ...grpc.CallOption) (*SimulateLinkStateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SimulateLinkStateResponse) - err := c.cc.Invoke(ctx, Link_SimulateLinkState_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, Link_SimulateLinkState_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -133,7 +131,7 @@ func _Link_WatchLocalLinks_Handler(srv interface{}, stream grpc.ServerStream) er if err := stream.RecvMsg(m); err != nil { return err } - return srv.(LinkServer).WatchLocalLinks(m, &linkWatchLocalLinksServer{ServerStream: stream}) + return srv.(LinkServer).WatchLocalLinks(m, &linkWatchLocalLinksServer{stream}) } type Link_WatchLocalLinksServer interface { diff --git a/livekit/livekit_agent.pb.go b/livekit/livekit_agent.pb.go index a44e26de5..e1f81d7cc 100644 --- a/livekit/livekit_agent.pb.go +++ b/livekit/livekit_agent.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_agent.proto package livekit @@ -1588,7 +1588,7 @@ func file_livekit_agent_proto_rawDescGZIP() []byte { var file_livekit_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_livekit_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_livekit_agent_proto_goTypes = []any{ +var file_livekit_agent_proto_goTypes = []interface{}{ (JobType)(0), // 0: livekit.JobType (WorkerStatus)(0), // 1: livekit.WorkerStatus (JobStatus)(0), // 2: livekit.JobStatus @@ -1654,7 +1654,7 @@ func file_livekit_agent_proto_init() { } file_livekit_models_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkerInfo); i { case 0: return &v.state @@ -1666,7 +1666,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AgentInfo); i { case 0: return &v.state @@ -1678,7 +1678,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Job); i { case 0: return &v.state @@ -1690,7 +1690,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkerMessage); i { case 0: return &v.state @@ -1702,7 +1702,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerMessage); i { case 0: return &v.state @@ -1714,7 +1714,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulateJobRequest); i { case 0: return &v.state @@ -1726,7 +1726,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkerPing); i { case 0: return &v.state @@ -1738,7 +1738,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkerPong); i { case 0: return &v.state @@ -1750,7 +1750,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterWorkerRequest); i { case 0: return &v.state @@ -1762,7 +1762,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterWorkerResponse); i { case 0: return &v.state @@ -1774,7 +1774,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MigrateJobRequest); i { case 0: return &v.state @@ -1786,7 +1786,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AvailabilityRequest); i { case 0: return &v.state @@ -1798,7 +1798,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AvailabilityResponse); i { case 0: return &v.state @@ -1810,7 +1810,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateJobStatus); i { case 0: return &v.state @@ -1822,7 +1822,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateWorkerStatus); i { case 0: return &v.state @@ -1834,7 +1834,7 @@ func file_livekit_agent_proto_init() { return nil } } - file_livekit_agent_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_livekit_agent_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JobAssignment); i { case 0: return &v.state @@ -1847,8 +1847,8 @@ func file_livekit_agent_proto_init() { } } } - file_livekit_agent_proto_msgTypes[2].OneofWrappers = []any{} - file_livekit_agent_proto_msgTypes[3].OneofWrappers = []any{ + file_livekit_agent_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_livekit_agent_proto_msgTypes[3].OneofWrappers = []interface{}{ (*WorkerMessage_Register)(nil), (*WorkerMessage_Availability)(nil), (*WorkerMessage_UpdateWorker)(nil), @@ -1857,16 +1857,16 @@ func file_livekit_agent_proto_init() { (*WorkerMessage_SimulateJob)(nil), (*WorkerMessage_MigrateJob)(nil), } - file_livekit_agent_proto_msgTypes[4].OneofWrappers = []any{ + file_livekit_agent_proto_msgTypes[4].OneofWrappers = []interface{}{ (*ServerMessage_Register)(nil), (*ServerMessage_Availability)(nil), (*ServerMessage_Assignment)(nil), (*ServerMessage_Pong)(nil), } - file_livekit_agent_proto_msgTypes[8].OneofWrappers = []any{} - file_livekit_agent_proto_msgTypes[13].OneofWrappers = []any{} - file_livekit_agent_proto_msgTypes[14].OneofWrappers = []any{} - file_livekit_agent_proto_msgTypes[15].OneofWrappers = []any{} + file_livekit_agent_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_livekit_agent_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_livekit_agent_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_livekit_agent_proto_msgTypes[15].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_analytics.pb.go b/livekit/livekit_analytics.pb.go index 335d9dcc2..4b42b81a1 100644 --- a/livekit/livekit_analytics.pb.go +++ b/livekit/livekit_analytics.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_analytics.proto package livekit @@ -1526,7 +1526,7 @@ func file_livekit_analytics_proto_rawDescGZIP() []byte { var file_livekit_analytics_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_livekit_analytics_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_livekit_analytics_proto_goTypes = []any{ +var file_livekit_analytics_proto_goTypes = []interface{}{ (StreamType)(0), // 0: livekit.StreamType (AnalyticsEventType)(0), // 1: livekit.AnalyticsEventType (*AnalyticsVideoLayer)(nil), // 2: livekit.AnalyticsVideoLayer @@ -1595,7 +1595,7 @@ func file_livekit_analytics_proto_init() { file_livekit_egress_proto_init() file_livekit_ingress_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_analytics_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsVideoLayer); i { case 0: return &v.state @@ -1607,7 +1607,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsStream); i { case 0: return &v.state @@ -1619,7 +1619,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsStat); i { case 0: return &v.state @@ -1631,7 +1631,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsStats); i { case 0: return &v.state @@ -1643,7 +1643,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsClientMeta); i { case 0: return &v.state @@ -1655,7 +1655,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsEvent); i { case 0: return &v.state @@ -1667,7 +1667,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsEvents); i { case 0: return &v.state @@ -1679,7 +1679,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsRoomParticipant); i { case 0: return &v.state @@ -1691,7 +1691,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsRoom); i { case 0: return &v.state @@ -1703,7 +1703,7 @@ func file_livekit_analytics_proto_init() { return nil } } - file_livekit_analytics_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_analytics_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnalyticsNodeRooms); i { case 0: return &v.state @@ -1716,7 +1716,7 @@ func file_livekit_analytics_proto_init() { } } } - file_livekit_analytics_proto_msgTypes[4].OneofWrappers = []any{} + file_livekit_analytics_proto_msgTypes[4].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_egress.pb.go b/livekit/livekit_egress.pb.go index 0284ccd17..60e1b9f82 100644 --- a/livekit/livekit_egress.pb.go +++ b/livekit/livekit_egress.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_egress.proto package livekit @@ -4338,7 +4338,7 @@ func file_livekit_egress_proto_rawDescGZIP() []byte { var file_livekit_egress_proto_enumTypes = make([]protoimpl.EnumInfo, 8) var file_livekit_egress_proto_msgTypes = make([]protoimpl.MessageInfo, 30) -var file_livekit_egress_proto_goTypes = []any{ +var file_livekit_egress_proto_goTypes = []interface{}{ (EncodedFileType)(0), // 0: livekit.EncodedFileType (SegmentedFileProtocol)(0), // 1: livekit.SegmentedFileProtocol (SegmentedFileSuffix)(0), // 2: livekit.SegmentedFileSuffix @@ -4499,7 +4499,7 @@ func file_livekit_egress_proto_init() { } file_livekit_models_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_egress_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomCompositeEgressRequest); i { case 0: return &v.state @@ -4511,7 +4511,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WebEgressRequest); i { case 0: return &v.state @@ -4523,7 +4523,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantEgressRequest); i { case 0: return &v.state @@ -4535,7 +4535,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackCompositeEgressRequest); i { case 0: return &v.state @@ -4547,7 +4547,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackEgressRequest); i { case 0: return &v.state @@ -4559,7 +4559,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodedFileOutput); i { case 0: return &v.state @@ -4571,7 +4571,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SegmentedFileOutput); i { case 0: return &v.state @@ -4583,7 +4583,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DirectFileOutput); i { case 0: return &v.state @@ -4595,7 +4595,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImageOutput); i { case 0: return &v.state @@ -4607,7 +4607,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*S3Upload); i { case 0: return &v.state @@ -4619,7 +4619,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GCPUpload); i { case 0: return &v.state @@ -4631,7 +4631,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AzureBlobUpload); i { case 0: return &v.state @@ -4643,7 +4643,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AliOSSUpload); i { case 0: return &v.state @@ -4655,7 +4655,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProxyConfig); i { case 0: return &v.state @@ -4667,7 +4667,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamOutput); i { case 0: return &v.state @@ -4679,7 +4679,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodingOptions); i { case 0: return &v.state @@ -4691,7 +4691,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateLayoutRequest); i { case 0: return &v.state @@ -4703,7 +4703,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateStreamRequest); i { case 0: return &v.state @@ -4715,7 +4715,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListEgressRequest); i { case 0: return &v.state @@ -4727,7 +4727,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListEgressResponse); i { case 0: return &v.state @@ -4739,7 +4739,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StopEgressRequest); i { case 0: return &v.state @@ -4751,7 +4751,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EgressInfo); i { case 0: return &v.state @@ -4763,7 +4763,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[22].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamInfoList); i { case 0: return &v.state @@ -4775,7 +4775,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[23].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamInfo); i { case 0: return &v.state @@ -4787,7 +4787,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[24].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileInfo); i { case 0: return &v.state @@ -4799,7 +4799,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[25].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SegmentsInfo); i { case 0: return &v.state @@ -4811,7 +4811,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[26].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ImagesInfo); i { case 0: return &v.state @@ -4823,7 +4823,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[27].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AutoParticipantEgress); i { case 0: return &v.state @@ -4835,7 +4835,7 @@ func file_livekit_egress_proto_init() { return nil } } - file_livekit_egress_proto_msgTypes[28].Exporter = func(v any, i int) any { + file_livekit_egress_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AutoTrackEgress); i { case 0: return &v.state @@ -4848,60 +4848,60 @@ func file_livekit_egress_proto_init() { } } } - file_livekit_egress_proto_msgTypes[0].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[0].OneofWrappers = []interface{}{ (*RoomCompositeEgressRequest_File)(nil), (*RoomCompositeEgressRequest_Stream)(nil), (*RoomCompositeEgressRequest_Segments)(nil), (*RoomCompositeEgressRequest_Preset)(nil), (*RoomCompositeEgressRequest_Advanced)(nil), } - file_livekit_egress_proto_msgTypes[1].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[1].OneofWrappers = []interface{}{ (*WebEgressRequest_File)(nil), (*WebEgressRequest_Stream)(nil), (*WebEgressRequest_Segments)(nil), (*WebEgressRequest_Preset)(nil), (*WebEgressRequest_Advanced)(nil), } - file_livekit_egress_proto_msgTypes[2].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ParticipantEgressRequest_Preset)(nil), (*ParticipantEgressRequest_Advanced)(nil), } - file_livekit_egress_proto_msgTypes[3].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[3].OneofWrappers = []interface{}{ (*TrackCompositeEgressRequest_File)(nil), (*TrackCompositeEgressRequest_Stream)(nil), (*TrackCompositeEgressRequest_Segments)(nil), (*TrackCompositeEgressRequest_Preset)(nil), (*TrackCompositeEgressRequest_Advanced)(nil), } - file_livekit_egress_proto_msgTypes[4].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[4].OneofWrappers = []interface{}{ (*TrackEgressRequest_File)(nil), (*TrackEgressRequest_WebsocketUrl)(nil), } - file_livekit_egress_proto_msgTypes[5].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[5].OneofWrappers = []interface{}{ (*EncodedFileOutput_S3)(nil), (*EncodedFileOutput_Gcp)(nil), (*EncodedFileOutput_Azure)(nil), (*EncodedFileOutput_AliOSS)(nil), } - file_livekit_egress_proto_msgTypes[6].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[6].OneofWrappers = []interface{}{ (*SegmentedFileOutput_S3)(nil), (*SegmentedFileOutput_Gcp)(nil), (*SegmentedFileOutput_Azure)(nil), (*SegmentedFileOutput_AliOSS)(nil), } - file_livekit_egress_proto_msgTypes[7].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[7].OneofWrappers = []interface{}{ (*DirectFileOutput_S3)(nil), (*DirectFileOutput_Gcp)(nil), (*DirectFileOutput_Azure)(nil), (*DirectFileOutput_AliOSS)(nil), } - file_livekit_egress_proto_msgTypes[8].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[8].OneofWrappers = []interface{}{ (*ImageOutput_S3)(nil), (*ImageOutput_Gcp)(nil), (*ImageOutput_Azure)(nil), (*ImageOutput_AliOSS)(nil), } - file_livekit_egress_proto_msgTypes[21].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[21].OneofWrappers = []interface{}{ (*EgressInfo_RoomComposite)(nil), (*EgressInfo_Web)(nil), (*EgressInfo_Participant)(nil), @@ -4911,11 +4911,11 @@ func file_livekit_egress_proto_init() { (*EgressInfo_File)(nil), (*EgressInfo_Segments)(nil), } - file_livekit_egress_proto_msgTypes[27].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[27].OneofWrappers = []interface{}{ (*AutoParticipantEgress_Preset)(nil), (*AutoParticipantEgress_Advanced)(nil), } - file_livekit_egress_proto_msgTypes[28].OneofWrappers = []any{ + file_livekit_egress_proto_msgTypes[28].OneofWrappers = []interface{}{ (*AutoTrackEgress_S3)(nil), (*AutoTrackEgress_Gcp)(nil), (*AutoTrackEgress_Azure)(nil), diff --git a/livekit/livekit_ingress.pb.go b/livekit/livekit_ingress.pb.go index 85427d9a5..e75330ab2 100644 --- a/livekit/livekit_ingress.pb.go +++ b/livekit/livekit_ingress.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_ingress.proto package livekit @@ -1726,7 +1726,7 @@ func file_livekit_ingress_proto_rawDescGZIP() []byte { var file_livekit_ingress_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_livekit_ingress_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_livekit_ingress_proto_goTypes = []any{ +var file_livekit_ingress_proto_goTypes = []interface{}{ (IngressInput)(0), // 0: livekit.IngressInput (IngressAudioEncodingPreset)(0), // 1: livekit.IngressAudioEncodingPreset (IngressVideoEncodingPreset)(0), // 2: livekit.IngressVideoEncodingPreset @@ -1796,7 +1796,7 @@ func file_livekit_ingress_proto_init() { } file_livekit_models_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_ingress_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateIngressRequest); i { case 0: return &v.state @@ -1808,7 +1808,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressAudioOptions); i { case 0: return &v.state @@ -1820,7 +1820,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressVideoOptions); i { case 0: return &v.state @@ -1832,7 +1832,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressAudioEncodingOptions); i { case 0: return &v.state @@ -1844,7 +1844,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressVideoEncodingOptions); i { case 0: return &v.state @@ -1856,7 +1856,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressInfo); i { case 0: return &v.state @@ -1868,7 +1868,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IngressState); i { case 0: return &v.state @@ -1880,7 +1880,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InputVideoState); i { case 0: return &v.state @@ -1892,7 +1892,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InputAudioState); i { case 0: return &v.state @@ -1904,7 +1904,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateIngressRequest); i { case 0: return &v.state @@ -1916,7 +1916,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIngressRequest); i { case 0: return &v.state @@ -1928,7 +1928,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListIngressResponse); i { case 0: return &v.state @@ -1940,7 +1940,7 @@ func file_livekit_ingress_proto_init() { return nil } } - file_livekit_ingress_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_ingress_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteIngressRequest); i { case 0: return &v.state @@ -1953,17 +1953,17 @@ func file_livekit_ingress_proto_init() { } } } - file_livekit_ingress_proto_msgTypes[0].OneofWrappers = []any{} - file_livekit_ingress_proto_msgTypes[1].OneofWrappers = []any{ + file_livekit_ingress_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_livekit_ingress_proto_msgTypes[1].OneofWrappers = []interface{}{ (*IngressAudioOptions_Preset)(nil), (*IngressAudioOptions_Options)(nil), } - file_livekit_ingress_proto_msgTypes[2].OneofWrappers = []any{ + file_livekit_ingress_proto_msgTypes[2].OneofWrappers = []interface{}{ (*IngressVideoOptions_Preset)(nil), (*IngressVideoOptions_Options)(nil), } - file_livekit_ingress_proto_msgTypes[5].OneofWrappers = []any{} - file_livekit_ingress_proto_msgTypes[9].OneofWrappers = []any{} + file_livekit_ingress_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_livekit_ingress_proto_msgTypes[9].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_internal.pb.go b/livekit/livekit_internal.pb.go index e10faf0e8..076f6fead 100644 --- a/livekit/livekit_internal.pb.go +++ b/livekit/livekit_internal.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_internal.proto package livekit @@ -1271,7 +1271,7 @@ func file_livekit_internal_proto_rawDescGZIP() []byte { var file_livekit_internal_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_livekit_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_livekit_internal_proto_goTypes = []any{ +var file_livekit_internal_proto_goTypes = []interface{}{ (NodeType)(0), // 0: livekit.NodeType (NodeState)(0), // 1: livekit.NodeState (ICECandidateType)(0), // 2: livekit.ICECandidateType @@ -1312,7 +1312,7 @@ func file_livekit_internal_proto_init() { file_livekit_models_proto_init() file_livekit_egress_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_internal_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_internal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Node); i { case 0: return &v.state @@ -1324,7 +1324,7 @@ func file_livekit_internal_proto_init() { return nil } } - file_livekit_internal_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_internal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeStats); i { case 0: return &v.state @@ -1336,7 +1336,7 @@ func file_livekit_internal_proto_init() { return nil } } - file_livekit_internal_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_internal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartSession); i { case 0: return &v.state @@ -1348,7 +1348,7 @@ func file_livekit_internal_proto_init() { return nil } } - file_livekit_internal_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_internal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomInternal); i { case 0: return &v.state @@ -1360,7 +1360,7 @@ func file_livekit_internal_proto_init() { return nil } } - file_livekit_internal_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_internal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ICEConfig); i { case 0: return &v.state @@ -1373,7 +1373,7 @@ func file_livekit_internal_proto_init() { } } } - file_livekit_internal_proto_msgTypes[2].OneofWrappers = []any{} + file_livekit_internal_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_models.pb.go b/livekit/livekit_models.pb.go index f157abc0f..6616009ba 100644 --- a/livekit/livekit_models.pb.go +++ b/livekit/livekit_models.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_models.proto package livekit @@ -4082,7 +4082,7 @@ func file_livekit_models_proto_rawDescGZIP() []byte { var file_livekit_models_proto_enumTypes = make([]protoimpl.EnumInfo, 18) var file_livekit_models_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_livekit_models_proto_goTypes = []any{ +var file_livekit_models_proto_goTypes = []interface{}{ (AudioCodec)(0), // 0: livekit.AudioCodec (VideoCodec)(0), // 1: livekit.VideoCodec (ImageCodec)(0), // 2: livekit.ImageCodec @@ -4188,7 +4188,7 @@ func file_livekit_models_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_livekit_models_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Room); i { case 0: return &v.state @@ -4200,7 +4200,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Codec); i { case 0: return &v.state @@ -4212,7 +4212,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PlayoutDelay); i { case 0: return &v.state @@ -4224,7 +4224,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantPermission); i { case 0: return &v.state @@ -4236,7 +4236,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantInfo); i { case 0: return &v.state @@ -4248,7 +4248,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Encryption); i { case 0: return &v.state @@ -4260,7 +4260,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulcastCodecInfo); i { case 0: return &v.state @@ -4272,7 +4272,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackInfo); i { case 0: return &v.state @@ -4284,7 +4284,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VideoLayer); i { case 0: return &v.state @@ -4296,7 +4296,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DataPacket); i { case 0: return &v.state @@ -4308,7 +4308,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActiveSpeakerUpdate); i { case 0: return &v.state @@ -4320,7 +4320,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpeakerInfo); i { case 0: return &v.state @@ -4332,7 +4332,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserPacket); i { case 0: return &v.state @@ -4344,7 +4344,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SipDTMF); i { case 0: return &v.state @@ -4356,7 +4356,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Transcription); i { case 0: return &v.state @@ -4368,7 +4368,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TranscriptionSegment); i { case 0: return &v.state @@ -4380,7 +4380,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantTracks); i { case 0: return &v.state @@ -4392,7 +4392,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerInfo); i { case 0: return &v.state @@ -4404,7 +4404,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientInfo); i { case 0: return &v.state @@ -4416,7 +4416,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientConfiguration); i { case 0: return &v.state @@ -4428,7 +4428,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VideoConfiguration); i { case 0: return &v.state @@ -4440,7 +4440,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisabledCodecs); i { case 0: return &v.state @@ -4452,7 +4452,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[22].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RTPDrift); i { case 0: return &v.state @@ -4464,7 +4464,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[23].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RTPStats); i { case 0: return &v.state @@ -4476,7 +4476,7 @@ func file_livekit_models_proto_init() { return nil } } - file_livekit_models_proto_msgTypes[24].Exporter = func(v any, i int) any { + file_livekit_models_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TimedVersion); i { case 0: return &v.state @@ -4489,13 +4489,13 @@ func file_livekit_models_proto_init() { } } } - file_livekit_models_proto_msgTypes[9].OneofWrappers = []any{ + file_livekit_models_proto_msgTypes[9].OneofWrappers = []interface{}{ (*DataPacket_User)(nil), (*DataPacket_Speaker)(nil), (*DataPacket_SipDtmf)(nil), (*DataPacket_Transcription)(nil), } - file_livekit_models_proto_msgTypes[12].OneofWrappers = []any{} + file_livekit_models_proto_msgTypes[12].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_room.pb.go b/livekit/livekit_room.pb.go index 5e851a661..edaaf1c53 100644 --- a/livekit/livekit_room.pb.go +++ b/livekit/livekit_room.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_room.proto package livekit @@ -1310,7 +1310,7 @@ func file_livekit_room_proto_rawDescGZIP() []byte { } var file_livekit_room_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_livekit_room_proto_goTypes = []any{ +var file_livekit_room_proto_goTypes = []interface{}{ (*CreateRoomRequest)(nil), // 0: livekit.CreateRoomRequest (*RoomEgress)(nil), // 1: livekit.RoomEgress (*ListRoomsRequest)(nil), // 2: livekit.ListRoomsRequest @@ -1387,7 +1387,7 @@ func file_livekit_room_proto_init() { file_livekit_models_proto_init() file_livekit_egress_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_room_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateRoomRequest); i { case 0: return &v.state @@ -1399,7 +1399,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomEgress); i { case 0: return &v.state @@ -1411,7 +1411,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRoomsRequest); i { case 0: return &v.state @@ -1423,7 +1423,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRoomsResponse); i { case 0: return &v.state @@ -1435,7 +1435,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRoomRequest); i { case 0: return &v.state @@ -1447,7 +1447,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRoomResponse); i { case 0: return &v.state @@ -1459,7 +1459,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListParticipantsRequest); i { case 0: return &v.state @@ -1471,7 +1471,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListParticipantsResponse); i { case 0: return &v.state @@ -1483,7 +1483,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomParticipantIdentity); i { case 0: return &v.state @@ -1495,7 +1495,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveParticipantResponse); i { case 0: return &v.state @@ -1507,7 +1507,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MuteRoomTrackRequest); i { case 0: return &v.state @@ -1519,7 +1519,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MuteRoomTrackResponse); i { case 0: return &v.state @@ -1531,7 +1531,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateParticipantRequest); i { case 0: return &v.state @@ -1543,7 +1543,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubscriptionsRequest); i { case 0: return &v.state @@ -1555,7 +1555,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubscriptionsResponse); i { case 0: return &v.state @@ -1567,7 +1567,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SendDataRequest); i { case 0: return &v.state @@ -1579,7 +1579,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SendDataResponse); i { case 0: return &v.state @@ -1591,7 +1591,7 @@ func file_livekit_room_proto_init() { return nil } } - file_livekit_room_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_livekit_room_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateRoomMetadataRequest); i { case 0: return &v.state @@ -1604,7 +1604,7 @@ func file_livekit_room_proto_init() { } } } - file_livekit_room_proto_msgTypes[15].OneofWrappers = []any{} + file_livekit_room_proto_msgTypes[15].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/livekit/livekit_rtc.pb.go b/livekit/livekit_rtc.pb.go index dd3fe0fdb..47781e7b7 100644 --- a/livekit/livekit_rtc.pb.go +++ b/livekit/livekit_rtc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_rtc.proto package livekit @@ -4002,7 +4002,7 @@ func file_livekit_rtc_proto_rawDescGZIP() []byte { var file_livekit_rtc_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_livekit_rtc_proto_msgTypes = make([]protoimpl.MessageInfo, 40) -var file_livekit_rtc_proto_goTypes = []any{ +var file_livekit_rtc_proto_goTypes = []interface{}{ (SignalTarget)(0), // 0: livekit.SignalTarget (StreamState)(0), // 1: livekit.StreamState (CandidateProtocol)(0), // 2: livekit.CandidateProtocol @@ -4156,7 +4156,7 @@ func file_livekit_rtc_proto_init() { } file_livekit_models_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_rtc_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalRequest); i { case 0: return &v.state @@ -4168,7 +4168,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalResponse); i { case 0: return &v.state @@ -4180,7 +4180,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulcastCodec); i { case 0: return &v.state @@ -4192,7 +4192,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddTrackRequest); i { case 0: return &v.state @@ -4204,7 +4204,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrickleRequest); i { case 0: return &v.state @@ -4216,7 +4216,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MuteTrackRequest); i { case 0: return &v.state @@ -4228,7 +4228,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JoinResponse); i { case 0: return &v.state @@ -4240,7 +4240,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReconnectResponse); i { case 0: return &v.state @@ -4252,7 +4252,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackPublishedResponse); i { case 0: return &v.state @@ -4264,7 +4264,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackUnpublishedResponse); i { case 0: return &v.state @@ -4276,7 +4276,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SessionDescription); i { case 0: return &v.state @@ -4288,7 +4288,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantUpdate); i { case 0: return &v.state @@ -4300,7 +4300,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubscription); i { case 0: return &v.state @@ -4312,7 +4312,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateTrackSettings); i { case 0: return &v.state @@ -4324,7 +4324,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateLocalAudioTrack); i { case 0: return &v.state @@ -4336,7 +4336,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateLocalVideoTrack); i { case 0: return &v.state @@ -4348,7 +4348,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LeaveRequest); i { case 0: return &v.state @@ -4360,7 +4360,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateVideoLayers); i { case 0: return &v.state @@ -4372,7 +4372,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateParticipantMetadata); i { case 0: return &v.state @@ -4384,7 +4384,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ICEServer); i { case 0: return &v.state @@ -4396,7 +4396,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpeakersChanged); i { case 0: return &v.state @@ -4408,7 +4408,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoomUpdate); i { case 0: return &v.state @@ -4420,7 +4420,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[22].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectionQualityInfo); i { case 0: return &v.state @@ -4432,7 +4432,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[23].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectionQualityUpdate); i { case 0: return &v.state @@ -4444,7 +4444,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[24].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamStateInfo); i { case 0: return &v.state @@ -4456,7 +4456,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[25].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamStateUpdate); i { case 0: return &v.state @@ -4468,7 +4468,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[26].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribedQuality); i { case 0: return &v.state @@ -4480,7 +4480,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[27].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribedCodec); i { case 0: return &v.state @@ -4492,7 +4492,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[28].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribedQualityUpdate); i { case 0: return &v.state @@ -4504,7 +4504,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[29].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackPermission); i { case 0: return &v.state @@ -4516,7 +4516,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[30].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscriptionPermission); i { case 0: return &v.state @@ -4528,7 +4528,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[31].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscriptionPermissionUpdate); i { case 0: return &v.state @@ -4540,7 +4540,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[32].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncState); i { case 0: return &v.state @@ -4552,7 +4552,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[33].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DataChannelInfo); i { case 0: return &v.state @@ -4564,7 +4564,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[34].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SimulateScenario); i { case 0: return &v.state @@ -4576,7 +4576,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[35].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ping); i { case 0: return &v.state @@ -4588,7 +4588,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[36].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Pong); i { case 0: return &v.state @@ -4600,7 +4600,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[37].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegionSettings); i { case 0: return &v.state @@ -4612,7 +4612,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[38].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegionInfo); i { case 0: return &v.state @@ -4624,7 +4624,7 @@ func file_livekit_rtc_proto_init() { return nil } } - file_livekit_rtc_proto_msgTypes[39].Exporter = func(v any, i int) any { + file_livekit_rtc_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscriptionResponse); i { case 0: return &v.state @@ -4637,7 +4637,7 @@ func file_livekit_rtc_proto_init() { } } } - file_livekit_rtc_proto_msgTypes[0].OneofWrappers = []any{ + file_livekit_rtc_proto_msgTypes[0].OneofWrappers = []interface{}{ (*SignalRequest_Offer)(nil), (*SignalRequest_Answer)(nil), (*SignalRequest_Trickle)(nil), @@ -4656,7 +4656,7 @@ func file_livekit_rtc_proto_init() { (*SignalRequest_UpdateAudioTrack)(nil), (*SignalRequest_UpdateVideoTrack)(nil), } - file_livekit_rtc_proto_msgTypes[1].OneofWrappers = []any{ + file_livekit_rtc_proto_msgTypes[1].OneofWrappers = []interface{}{ (*SignalResponse_Join)(nil), (*SignalResponse_Answer)(nil), (*SignalResponse_Offer)(nil), @@ -4678,7 +4678,7 @@ func file_livekit_rtc_proto_init() { (*SignalResponse_PongResp)(nil), (*SignalResponse_SubscriptionResponse)(nil), } - file_livekit_rtc_proto_msgTypes[34].OneofWrappers = []any{ + file_livekit_rtc_proto_msgTypes[34].OneofWrappers = []interface{}{ (*SimulateScenario_SpeakerUpdate)(nil), (*SimulateScenario_NodeFailure)(nil), (*SimulateScenario_Migration)(nil), diff --git a/livekit/livekit_sip.pb.go b/livekit/livekit_sip.pb.go index 32d1e2f75..ed92cd74c 100644 --- a/livekit/livekit_sip.pb.go +++ b/livekit/livekit_sip.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_sip.proto package livekit @@ -1468,7 +1468,7 @@ func file_livekit_sip_proto_rawDescGZIP() []byte { var file_livekit_sip_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_livekit_sip_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_livekit_sip_proto_goTypes = []any{ +var file_livekit_sip_proto_goTypes = []interface{}{ (SIPTransport)(0), // 0: livekit.SIPTransport (*CreateSIPTrunkRequest)(nil), // 1: livekit.CreateSIPTrunkRequest (*SIPTrunkInfo)(nil), // 2: livekit.SIPTrunkInfo @@ -1521,7 +1521,7 @@ func file_livekit_sip_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_livekit_sip_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSIPTrunkRequest); i { case 0: return &v.state @@ -1533,7 +1533,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPTrunkInfo); i { case 0: return &v.state @@ -1545,7 +1545,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSIPTrunkRequest); i { case 0: return &v.state @@ -1557,7 +1557,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSIPTrunkResponse); i { case 0: return &v.state @@ -1569,7 +1569,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSIPTrunkRequest); i { case 0: return &v.state @@ -1581,7 +1581,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPDispatchRuleDirect); i { case 0: return &v.state @@ -1593,7 +1593,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPDispatchRuleIndividual); i { case 0: return &v.state @@ -1605,7 +1605,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPDispatchRule); i { case 0: return &v.state @@ -1617,7 +1617,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSIPDispatchRuleRequest); i { case 0: return &v.state @@ -1629,7 +1629,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPDispatchRuleInfo); i { case 0: return &v.state @@ -1641,7 +1641,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSIPDispatchRuleRequest); i { case 0: return &v.state @@ -1653,7 +1653,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSIPDispatchRuleResponse); i { case 0: return &v.state @@ -1665,7 +1665,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSIPDispatchRuleRequest); i { case 0: return &v.state @@ -1677,7 +1677,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSIPParticipantRequest); i { case 0: return &v.state @@ -1689,7 +1689,7 @@ func file_livekit_sip_proto_init() { return nil } } - file_livekit_sip_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_livekit_sip_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SIPParticipantInfo); i { case 0: return &v.state @@ -1702,7 +1702,7 @@ func file_livekit_sip_proto_init() { } } } - file_livekit_sip_proto_msgTypes[7].OneofWrappers = []any{ + file_livekit_sip_proto_msgTypes[7].OneofWrappers = []interface{}{ (*SIPDispatchRule_DispatchRuleDirect)(nil), (*SIPDispatchRule_DispatchRuleIndividual)(nil), } diff --git a/livekit/livekit_webhook.pb.go b/livekit/livekit_webhook.pb.go index b4f0f0f42..eddff6c37 100644 --- a/livekit/livekit_webhook.pb.go +++ b/livekit/livekit_webhook.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: livekit_webhook.proto package livekit @@ -56,6 +56,7 @@ type WebhookEvent struct { Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"` // timestamp in seconds CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + DequeuedAt int64 `protobuf:"varint,12,opt,name=dequeued_at,json=dequeuedAt,proto3" json:"dequeued_at,omitempty"` NumDropped int32 `protobuf:"varint,11,opt,name=num_dropped,json=numDropped,proto3" json:"num_dropped,omitempty"` } @@ -147,6 +148,13 @@ func (x *WebhookEvent) GetCreatedAt() int64 { return 0 } +func (x *WebhookEvent) GetDequeuedAt() int64 { + if x != nil { + return x.DequeuedAt + } + return 0 +} + func (x *WebhookEvent) GetNumDropped() int32 { if x != nil { return x.NumDropped @@ -154,6 +162,69 @@ func (x *WebhookEvent) GetNumDropped() int32 { return 0 } +type BatchedWebhookEvents struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*WebhookEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + NumDropped int32 `protobuf:"varint,2,opt,name=num_dropped,json=numDropped,proto3" json:"num_dropped,omitempty"` + DequeuedAt int64 `protobuf:"varint,3,opt,name=dequeued_at,json=dequeuedAt,proto3" json:"dequeued_at,omitempty"` +} + +func (x *BatchedWebhookEvents) Reset() { + *x = BatchedWebhookEvents{} + if protoimpl.UnsafeEnabled { + mi := &file_livekit_webhook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchedWebhookEvents) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchedWebhookEvents) ProtoMessage() {} + +func (x *BatchedWebhookEvents) ProtoReflect() protoreflect.Message { + mi := &file_livekit_webhook_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchedWebhookEvents.ProtoReflect.Descriptor instead. +func (*BatchedWebhookEvents) Descriptor() ([]byte, []int) { + return file_livekit_webhook_proto_rawDescGZIP(), []int{1} +} + +func (x *BatchedWebhookEvents) GetEvents() []*WebhookEvent { + if x != nil { + return x.Events + } + return nil +} + +func (x *BatchedWebhookEvents) GetNumDropped() int32 { + if x != nil { + return x.NumDropped + } + return 0 +} + +func (x *BatchedWebhookEvents) GetDequeuedAt() int64 { + if x != nil { + return x.DequeuedAt + } + return 0 +} + var File_livekit_webhook_proto protoreflect.FileDescriptor var file_livekit_webhook_proto_rawDesc = []byte{ @@ -163,7 +234,7 @@ var file_livekit_webhook_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x5f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x02, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, + 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x03, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, @@ -184,14 +255,24 @@ var file_livekit_webhook_proto_rawDesc = []byte{ 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x44, 0x72, 0x6f, 0x70, 0x70, - 0x65, 0x64, 0x42, 0x46, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c, 0x69, 0x76, 0x65, - 0x4b, 0x69, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c, 0x69, 0x76, 0x65, - 0x4b, 0x69, 0x74, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x44, 0x72, 0x6f, 0x70, + 0x70, 0x65, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x57, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, + 0x75, 0x6d, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x64, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x64, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x41, 0x74, 0x42, 0x46, 0x5a, + 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, + 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x69, 0x76, + 0x65, 0x6b, 0x69, 0x74, 0xaa, 0x02, 0x0d, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0xea, 0x02, 0x0e, 0x4c, 0x69, 0x76, 0x65, 0x4b, 0x69, 0x74, 0x3a, 0x3a, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -206,26 +287,28 @@ func file_livekit_webhook_proto_rawDescGZIP() []byte { return file_livekit_webhook_proto_rawDescData } -var file_livekit_webhook_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_livekit_webhook_proto_goTypes = []any{ - (*WebhookEvent)(nil), // 0: livekit.WebhookEvent - (*Room)(nil), // 1: livekit.Room - (*ParticipantInfo)(nil), // 2: livekit.ParticipantInfo - (*EgressInfo)(nil), // 3: livekit.EgressInfo - (*IngressInfo)(nil), // 4: livekit.IngressInfo - (*TrackInfo)(nil), // 5: livekit.TrackInfo +var file_livekit_webhook_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_livekit_webhook_proto_goTypes = []interface{}{ + (*WebhookEvent)(nil), // 0: livekit.WebhookEvent + (*BatchedWebhookEvents)(nil), // 1: livekit.BatchedWebhookEvents + (*Room)(nil), // 2: livekit.Room + (*ParticipantInfo)(nil), // 3: livekit.ParticipantInfo + (*EgressInfo)(nil), // 4: livekit.EgressInfo + (*IngressInfo)(nil), // 5: livekit.IngressInfo + (*TrackInfo)(nil), // 6: livekit.TrackInfo } var file_livekit_webhook_proto_depIdxs = []int32{ - 1, // 0: livekit.WebhookEvent.room:type_name -> livekit.Room - 2, // 1: livekit.WebhookEvent.participant:type_name -> livekit.ParticipantInfo - 3, // 2: livekit.WebhookEvent.egress_info:type_name -> livekit.EgressInfo - 4, // 3: livekit.WebhookEvent.ingress_info:type_name -> livekit.IngressInfo - 5, // 4: livekit.WebhookEvent.track:type_name -> livekit.TrackInfo - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 2, // 0: livekit.WebhookEvent.room:type_name -> livekit.Room + 3, // 1: livekit.WebhookEvent.participant:type_name -> livekit.ParticipantInfo + 4, // 2: livekit.WebhookEvent.egress_info:type_name -> livekit.EgressInfo + 5, // 3: livekit.WebhookEvent.ingress_info:type_name -> livekit.IngressInfo + 6, // 4: livekit.WebhookEvent.track:type_name -> livekit.TrackInfo + 0, // 5: livekit.BatchedWebhookEvents.events:type_name -> livekit.WebhookEvent + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_livekit_webhook_proto_init() } @@ -237,7 +320,7 @@ func file_livekit_webhook_proto_init() { file_livekit_egress_proto_init() file_livekit_ingress_proto_init() if !protoimpl.UnsafeEnabled { - file_livekit_webhook_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_livekit_webhook_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WebhookEvent); i { case 0: return &v.state @@ -249,6 +332,18 @@ func file_livekit_webhook_proto_init() { return nil } } + file_livekit_webhook_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchedWebhookEvents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -256,7 +351,7 @@ func file_livekit_webhook_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_livekit_webhook_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/protobufs/livekit_webhook.proto b/protobufs/livekit_webhook.proto index 3e47c468a..473d6a9dc 100644 --- a/protobufs/livekit_webhook.proto +++ b/protobufs/livekit_webhook.proto @@ -55,3 +55,11 @@ message WebhookEvent { // NEXT_ID: 13 } + +message BatchedWebhookEvents { + repeated WebhookEvent events = 1; + + int32 num_dropped = 2; + + int64 dequeued_at = 3; +} diff --git a/rpc/agent.pb.go b/rpc/agent.pb.go index ebde120b1..bdf3ed4b7 100644 --- a/rpc/agent.pb.go +++ b/rpc/agent.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/agent.proto package rpc @@ -192,7 +192,7 @@ func file_rpc_agent_proto_rawDescGZIP() []byte { } var file_rpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_rpc_agent_proto_goTypes = []any{ +var file_rpc_agent_proto_goTypes = []interface{}{ (*CheckEnabledRequest)(nil), // 0: rpc.CheckEnabledRequest (*CheckEnabledResponse)(nil), // 1: rpc.CheckEnabledResponse (*livekit.Job)(nil), // 2: livekit.Job @@ -218,7 +218,7 @@ func file_rpc_agent_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckEnabledRequest); i { case 0: return &v.state @@ -230,7 +230,7 @@ func file_rpc_agent_proto_init() { return nil } } - file_rpc_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckEnabledResponse); i { case 0: return &v.state diff --git a/rpc/analytics.pb.go b/rpc/analytics.pb.go index 185473e78..335447ee7 100644 --- a/rpc/analytics.pb.go +++ b/rpc/analytics.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/analytics.proto package rpc @@ -64,7 +64,7 @@ var file_rpc_analytics_proto_rawDesc = []byte{ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_rpc_analytics_proto_goTypes = []any{ +var file_rpc_analytics_proto_goTypes = []interface{}{ (*livekit.AnalyticsStats)(nil), // 0: livekit.AnalyticsStats (*livekit.AnalyticsEvents)(nil), // 1: livekit.AnalyticsEvents (*livekit.AnalyticsNodeRooms)(nil), // 2: livekit.AnalyticsNodeRooms diff --git a/rpc/analytics_grpc.pb.go b/rpc/analytics_grpc.pb.go index ac9fe3c6d..0c5e0aab5 100644 --- a/rpc/analytics_grpc.pb.go +++ b/rpc/analytics_grpc.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v4.23.4 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.3 // source: rpc/analytics.proto package rpc @@ -31,8 +31,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( AnalyticsRecorderService_IngestStats_FullMethodName = "/livekit.AnalyticsRecorderService/IngestStats" @@ -58,12 +58,11 @@ func NewAnalyticsRecorderServiceClient(cc grpc.ClientConnInterface) AnalyticsRec } func (c *analyticsRecorderServiceClient) IngestStats(ctx context.Context, opts ...grpc.CallOption) (AnalyticsRecorderService_IngestStatsClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[0], AnalyticsRecorderService_IngestStats_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[0], AnalyticsRecorderService_IngestStats_FullMethodName, opts...) if err != nil { return nil, err } - x := &analyticsRecorderServiceIngestStatsClient{ClientStream: stream} + x := &analyticsRecorderServiceIngestStatsClient{stream} return x, nil } @@ -93,12 +92,11 @@ func (x *analyticsRecorderServiceIngestStatsClient) CloseAndRecv() (*emptypb.Emp } func (c *analyticsRecorderServiceClient) IngestEvents(ctx context.Context, opts ...grpc.CallOption) (AnalyticsRecorderService_IngestEventsClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[1], AnalyticsRecorderService_IngestEvents_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[1], AnalyticsRecorderService_IngestEvents_FullMethodName, opts...) if err != nil { return nil, err } - x := &analyticsRecorderServiceIngestEventsClient{ClientStream: stream} + x := &analyticsRecorderServiceIngestEventsClient{stream} return x, nil } @@ -128,12 +126,11 @@ func (x *analyticsRecorderServiceIngestEventsClient) CloseAndRecv() (*emptypb.Em } func (c *analyticsRecorderServiceClient) IngestNodeRoomStates(ctx context.Context, opts ...grpc.CallOption) (AnalyticsRecorderService_IngestNodeRoomStatesClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[2], AnalyticsRecorderService_IngestNodeRoomStates_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &AnalyticsRecorderService_ServiceDesc.Streams[2], AnalyticsRecorderService_IngestNodeRoomStates_FullMethodName, opts...) if err != nil { return nil, err } - x := &analyticsRecorderServiceIngestNodeRoomStatesClient{ClientStream: stream} + x := &analyticsRecorderServiceIngestNodeRoomStatesClient{stream} return x, nil } @@ -200,7 +197,7 @@ func RegisterAnalyticsRecorderServiceServer(s grpc.ServiceRegistrar, srv Analyti } func _AnalyticsRecorderService_IngestStats_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AnalyticsRecorderServiceServer).IngestStats(&analyticsRecorderServiceIngestStatsServer{ServerStream: stream}) + return srv.(AnalyticsRecorderServiceServer).IngestStats(&analyticsRecorderServiceIngestStatsServer{stream}) } type AnalyticsRecorderService_IngestStatsServer interface { @@ -226,7 +223,7 @@ func (x *analyticsRecorderServiceIngestStatsServer) Recv() (*livekit.AnalyticsSt } func _AnalyticsRecorderService_IngestEvents_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AnalyticsRecorderServiceServer).IngestEvents(&analyticsRecorderServiceIngestEventsServer{ServerStream: stream}) + return srv.(AnalyticsRecorderServiceServer).IngestEvents(&analyticsRecorderServiceIngestEventsServer{stream}) } type AnalyticsRecorderService_IngestEventsServer interface { @@ -252,7 +249,7 @@ func (x *analyticsRecorderServiceIngestEventsServer) Recv() (*livekit.AnalyticsE } func _AnalyticsRecorderService_IngestNodeRoomStates_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AnalyticsRecorderServiceServer).IngestNodeRoomStates(&analyticsRecorderServiceIngestNodeRoomStatesServer{ServerStream: stream}) + return srv.(AnalyticsRecorderServiceServer).IngestNodeRoomStates(&analyticsRecorderServiceIngestNodeRoomStatesServer{stream}) } type AnalyticsRecorderService_IngestNodeRoomStatesServer interface { diff --git a/rpc/egress.pb.go b/rpc/egress.pb.go index be81e73b9..aa442eed7 100644 --- a/rpc/egress.pb.go +++ b/rpc/egress.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/egress.proto package rpc @@ -361,7 +361,7 @@ func file_rpc_egress_proto_rawDescGZIP() []byte { } var file_rpc_egress_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_rpc_egress_proto_goTypes = []any{ +var file_rpc_egress_proto_goTypes = []interface{}{ (*StartEgressRequest)(nil), // 0: rpc.StartEgressRequest (*ListActiveEgressRequest)(nil), // 1: rpc.ListActiveEgressRequest (*ListActiveEgressResponse)(nil), // 2: rpc.ListActiveEgressResponse @@ -401,7 +401,7 @@ func file_rpc_egress_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_egress_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_egress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartEgressRequest); i { case 0: return &v.state @@ -413,7 +413,7 @@ func file_rpc_egress_proto_init() { return nil } } - file_rpc_egress_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_egress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActiveEgressRequest); i { case 0: return &v.state @@ -425,7 +425,7 @@ func file_rpc_egress_proto_init() { return nil } } - file_rpc_egress_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_rpc_egress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActiveEgressResponse); i { case 0: return &v.state @@ -438,7 +438,7 @@ func file_rpc_egress_proto_init() { } } } - file_rpc_egress_proto_msgTypes[0].OneofWrappers = []any{ + file_rpc_egress_proto_msgTypes[0].OneofWrappers = []interface{}{ (*StartEgressRequest_RoomComposite)(nil), (*StartEgressRequest_Web)(nil), (*StartEgressRequest_Participant)(nil), diff --git a/rpc/ingress.pb.go b/rpc/ingress.pb.go index 1b333e65a..2021514b4 100644 --- a/rpc/ingress.pb.go +++ b/rpc/ingress.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/ingress.proto package rpc @@ -481,7 +481,7 @@ func file_rpc_ingress_proto_rawDescGZIP() []byte { } var file_rpc_ingress_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_rpc_ingress_proto_goTypes = []any{ +var file_rpc_ingress_proto_goTypes = []interface{}{ (*ListActiveIngressRequest)(nil), // 0: rpc.ListActiveIngressRequest (*ListActiveIngressResponse)(nil), // 1: rpc.ListActiveIngressResponse (*DeleteWHIPResourceRequest)(nil), // 2: rpc.DeleteWHIPResourceRequest @@ -523,7 +523,7 @@ func file_rpc_ingress_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_ingress_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActiveIngressRequest); i { case 0: return &v.state @@ -535,7 +535,7 @@ func file_rpc_ingress_proto_init() { return nil } } - file_rpc_ingress_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActiveIngressResponse); i { case 0: return &v.state @@ -547,7 +547,7 @@ func file_rpc_ingress_proto_init() { return nil } } - file_rpc_ingress_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteWHIPResourceRequest); i { case 0: return &v.state @@ -559,7 +559,7 @@ func file_rpc_ingress_proto_init() { return nil } } - file_rpc_ingress_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ICERestartWHIPResourceRequest); i { case 0: return &v.state @@ -571,7 +571,7 @@ func file_rpc_ingress_proto_init() { return nil } } - file_rpc_ingress_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ICERestartWHIPResourceResponse); i { case 0: return &v.state @@ -583,7 +583,7 @@ func file_rpc_ingress_proto_init() { return nil } } - file_rpc_ingress_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_rpc_ingress_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartIngressRequest); i { case 0: return &v.state diff --git a/rpc/io.pb.go b/rpc/io.pb.go index c4884e94e..b99bdf602 100644 --- a/rpc/io.pb.go +++ b/rpc/io.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/io.proto package rpc @@ -967,7 +967,7 @@ func file_rpc_io_proto_rawDescGZIP() []byte { var file_rpc_io_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_rpc_io_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_rpc_io_proto_goTypes = []any{ +var file_rpc_io_proto_goTypes = []interface{}{ (SIPDispatchResult)(0), // 0: rpc.SIPDispatchResult (*GetEgressRequest)(nil), // 1: rpc.GetEgressRequest (*UpdateMetricsRequest)(nil), // 2: rpc.UpdateMetricsRequest @@ -1025,7 +1025,7 @@ func file_rpc_io_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_io_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetEgressRequest); i { case 0: return &v.state @@ -1037,7 +1037,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateMetricsRequest); i { case 0: return &v.state @@ -1049,7 +1049,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetIngressInfoRequest); i { case 0: return &v.state @@ -1061,7 +1061,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetIngressInfoResponse); i { case 0: return &v.state @@ -1073,7 +1073,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateIngressStateRequest); i { case 0: return &v.state @@ -1085,7 +1085,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSIPTrunkAuthenticationRequest); i { case 0: return &v.state @@ -1097,7 +1097,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSIPTrunkAuthenticationResponse); i { case 0: return &v.state @@ -1109,7 +1109,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EvaluateSIPDispatchRulesRequest); i { case 0: return &v.state @@ -1121,7 +1121,7 @@ func file_rpc_io_proto_init() { return nil } } - file_rpc_io_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_rpc_io_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EvaluateSIPDispatchRulesResponse); i { case 0: return &v.state diff --git a/rpc/keepalive.pb.go b/rpc/keepalive.pb.go index 5023a3e71..8c2a356db 100644 --- a/rpc/keepalive.pb.go +++ b/rpc/keepalive.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/keepalive.proto package rpc @@ -114,7 +114,7 @@ func file_rpc_keepalive_proto_rawDescGZIP() []byte { } var file_rpc_keepalive_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_rpc_keepalive_proto_goTypes = []any{ +var file_rpc_keepalive_proto_goTypes = []interface{}{ (*KeepalivePing)(nil), // 0: rpc.KeepalivePing } var file_rpc_keepalive_proto_depIdxs = []int32{ @@ -133,7 +133,7 @@ func file_rpc_keepalive_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_keepalive_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_keepalive_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KeepalivePing); i { case 0: return &v.state diff --git a/rpc/participant.pb.go b/rpc/participant.pb.go index 1daa1fb48..9339f1805 100644 --- a/rpc/participant.pb.go +++ b/rpc/participant.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/participant.proto package rpc @@ -81,7 +81,7 @@ var file_rpc_participant_proto_rawDesc = []byte{ 0x6c, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_rpc_participant_proto_goTypes = []any{ +var file_rpc_participant_proto_goTypes = []interface{}{ (*livekit.RoomParticipantIdentity)(nil), // 0: livekit.RoomParticipantIdentity (*livekit.MuteRoomTrackRequest)(nil), // 1: livekit.MuteRoomTrackRequest (*livekit.UpdateParticipantRequest)(nil), // 2: livekit.UpdateParticipantRequest diff --git a/rpc/room.pb.go b/rpc/room.pb.go index 7ea2be17f..6e71fae8f 100644 --- a/rpc/room.pb.go +++ b/rpc/room.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/room.proto package rpc @@ -66,7 +66,7 @@ var file_rpc_room_proto_rawDesc = []byte{ 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_rpc_room_proto_goTypes = []any{ +var file_rpc_room_proto_goTypes = []interface{}{ (*livekit.DeleteRoomRequest)(nil), // 0: livekit.DeleteRoomRequest (*livekit.SendDataRequest)(nil), // 1: livekit.SendDataRequest (*livekit.UpdateRoomMetadataRequest)(nil), // 2: livekit.UpdateRoomMetadataRequest diff --git a/rpc/signal.pb.go b/rpc/signal.pb.go index acde1bdfc..35f35e173 100644 --- a/rpc/signal.pb.go +++ b/rpc/signal.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/signal.proto package rpc @@ -221,7 +221,7 @@ func file_rpc_signal_proto_rawDescGZIP() []byte { } var file_rpc_signal_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_rpc_signal_proto_goTypes = []any{ +var file_rpc_signal_proto_goTypes = []interface{}{ (*RelaySignalRequest)(nil), // 0: rpc.RelaySignalRequest (*RelaySignalResponse)(nil), // 1: rpc.RelaySignalResponse (*livekit.StartSession)(nil), // 2: livekit.StartSession @@ -247,7 +247,7 @@ func file_rpc_signal_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_signal_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_signal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelaySignalRequest); i { case 0: return &v.state @@ -259,7 +259,7 @@ func file_rpc_signal_proto_init() { return nil } } - file_rpc_signal_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_signal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RelaySignalResponse); i { case 0: return &v.state diff --git a/rpc/sip.pb.go b/rpc/sip.pb.go index 4454c7137..0709bfb60 100644 --- a/rpc/sip.pb.go +++ b/rpc/sip.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v4.23.4 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: rpc/sip.proto package rpc @@ -342,7 +342,7 @@ func file_rpc_sip_proto_rawDescGZIP() []byte { } var file_rpc_sip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_rpc_sip_proto_goTypes = []any{ +var file_rpc_sip_proto_goTypes = []interface{}{ (*InternalCreateSIPParticipantRequest)(nil), // 0: rpc.InternalCreateSIPParticipantRequest (*InternalCreateSIPParticipantResponse)(nil), // 1: rpc.InternalCreateSIPParticipantResponse (livekit.SIPTransport)(0), // 2: livekit.SIPTransport @@ -364,7 +364,7 @@ func file_rpc_sip_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_rpc_sip_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_rpc_sip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InternalCreateSIPParticipantRequest); i { case 0: return &v.state @@ -376,7 +376,7 @@ func file_rpc_sip_proto_init() { return nil } } - file_rpc_sip_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_rpc_sip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InternalCreateSIPParticipantResponse); i { case 0: return &v.state diff --git a/webhook/batch_url_notifier.go b/webhook/batch_url_notifier.go new file mode 100644 index 000000000..5c1f593c5 --- /dev/null +++ b/webhook/batch_url_notifier.go @@ -0,0 +1,155 @@ +package webhook + +import ( + "bytes" + "context" + "crypto/sha256" + "encoding/base64" + "github.com/hashicorp/go-retryablehttp" + "github.com/livekit/protocol/auth" + "github.com/livekit/protocol/livekit" + "github.com/livekit/protocol/logger" + "google.golang.org/protobuf/encoding/protojson" + "sync" + "time" +) + +const ( + DefaultBatchSendInterval = 100 * time.Millisecond + DefaultMaxBatchSize = 10000 +) + +type BatchURLNotifierParams struct { + Logger logger.Logger + URL string + Interval time.Duration + MaxSize int + APIKey string + APISecret string +} + +type BatchURLNotifier struct { + cancelFunc context.CancelFunc + client *retryablehttp.Client + mu sync.RWMutex + params BatchURLNotifierParams + batch []*livekit.WebhookEvent + dropped int // it's operated inside a mutex scope so no need for atomic type +} + +func NewBatchURLNotifier(ctx context.Context, params BatchURLNotifierParams) URLNotifier { + if params.Interval == 0 { + params.Interval = DefaultBatchSendInterval + } + if params.MaxSize == 0 { + params.MaxSize = DefaultMaxBatchSize + } + + ctx, cancel := context.WithCancel(ctx) + notifier := &BatchURLNotifier{ + cancelFunc: cancel, + params: params, + client: retryablehttp.NewClient(), + } + + go notifier.runner(ctx) + + return notifier +} + +func (b *BatchURLNotifier) runner(ctx context.Context) { + ticker := time.NewTicker(b.params.Interval) + for { + select { + case <-ticker.C: + b.mu.Lock() + b.sendBatch() + b.mu.Unlock() + case <-ctx.Done(): + return + } + } +} + +func (b *BatchURLNotifier) sendBatch() { + if len(b.batch) == 0 { + return + } + raw := &livekit.BatchedWebhookEvents{ + Events: b.batch, + NumDropped: int32(b.dropped), + DequeuedAt: time.Now().Unix(), + } + defer func() { + b.batch = nil + }() + b.dropped = 0 + + encoded, err := protojson.Marshal(raw) + if err != nil { + b.params.Logger.Warnw("Failed to marshal event", err) + b.dropped += len(b.batch) + return + } + + // sign payload + sum := sha256.Sum256(encoded) + b64 := base64.StdEncoding.EncodeToString(sum[:]) + at := auth.NewAccessToken(b.params.APIKey, b.params.APISecret). + SetValidFor(5 * time.Minute). + SetSha256(b64) + token, err := at.ToJWT() + if err != nil { + b.params.Logger.Warnw("Failed to generate jwt token", err) + b.dropped += len(b.batch) + return + } + + req, err := retryablehttp.NewRequest("POST", b.params.URL, bytes.NewReader(encoded)) + if err != nil { + b.params.Logger.Warnw("Failed to create http req", err) + b.dropped += len(b.batch) + return + } + + req.Header.Set(authHeader, token) + req.Header.Set("batched", "true") + req.Header.Set("content-type", "application/webhook+json") + resp, err := b.client.Do(req) + if err != nil { + b.params.Logger.Errorw("Failed to send request", err) + b.dropped += len(b.batch) + return + } + _ = resp.Body.Close() + + return +} + +func (b *BatchURLNotifier) SetKeys(apiKey, apiSecret string) { + b.mu.Lock() + defer b.mu.Unlock() + b.params.APIKey = apiKey + b.params.APISecret = apiSecret +} + +func (b *BatchURLNotifier) QueueNotify(event *livekit.WebhookEvent) error { + b.mu.Lock() + defer b.mu.Unlock() + b.batch = append(b.batch, event) + + if len(b.batch) >= b.params.MaxSize { + b.sendBatch() + } + + return nil +} + +func (b *BatchURLNotifier) Stop(force bool) { + b.cancelFunc() + if !force { + b.mu.Lock() + b.sendBatch() + b.mu.Unlock() + } +} diff --git a/webhook/notifier.go b/webhook/notifier.go index 719ad7b0f..e8fa58949 100644 --- a/webhook/notifier.go +++ b/webhook/notifier.go @@ -24,16 +24,31 @@ import ( type QueuedNotifier interface { QueueNotify(ctx context.Context, event *livekit.WebhookEvent) error + Stop(force bool) } type DefaultNotifier struct { - urlNotifiers []*URLNotifier + urlNotifiers []URLNotifier +} + +func NewBatchedNotifier(ctx context.Context, apiKey, apiSecret string, urls []string) QueuedNotifier { + n := &DefaultNotifier{} + for _, url := range urls { + u := NewBatchURLNotifier(ctx, BatchURLNotifierParams{ + Logger: logger.GetLogger().WithComponent("webhook"), + URL: url, + APIKey: apiKey, + APISecret: apiSecret, + }) + n.urlNotifiers = append(n.urlNotifiers, u) + } + return n } func NewDefaultNotifier(apiKey, apiSecret string, urls []string) QueuedNotifier { n := &DefaultNotifier{} for _, url := range urls { - u := NewURLNotifier(URLNotifierParams{ + u := NewDefaultURLNotifier(URLNotifierParams{ URL: url, Logger: logger.GetLogger().WithComponent("webhook"), APIKey: apiKey, @@ -52,7 +67,7 @@ func NewDefaultNotifierByParams(params []URLNotifierParams) QueuedNotifier { p.Logger = logger.GetLogger().WithComponent("webhook") } - u := NewURLNotifier(p) + u := NewDefaultURLNotifier(p) n.urlNotifiers = append(n.urlNotifiers, u) } return n @@ -62,7 +77,7 @@ func (n *DefaultNotifier) Stop(force bool) { wg := sync.WaitGroup{} for _, u := range n.urlNotifiers { wg.Add(1) - go func(u *URLNotifier) { + go func(u URLNotifier) { defer wg.Done() u.Stop(force) }(u) diff --git a/webhook/url_notifier.go b/webhook/url_notifier.go index 0d9a325c4..b600b706b 100644 --- a/webhook/url_notifier.go +++ b/webhook/url_notifier.go @@ -31,6 +31,12 @@ import ( "github.com/livekit/protocol/logger" ) +type URLNotifier interface { + SetKeys(apiKey, apiSecret string) + QueueNotify(event *livekit.WebhookEvent) error + Stop(force bool) +} + type URLNotifierParams struct { Logger logger.Logger QueueSize int @@ -42,9 +48,9 @@ type URLNotifierParams struct { const defaultQueueSize = 100 -// URLNotifier is a QueuedNotifier that sends a POST request to a Webhook URL. +// DefaultURLNotifier is a QueuedNotifier that sends a POST request to a Webhook URL. // It will retry on failure, and will drop events if notification fall too far behind -type URLNotifier struct { +type DefaultURLNotifier struct { mu sync.RWMutex params URLNotifierParams client *retryablehttp.Client @@ -52,7 +58,7 @@ type URLNotifier struct { worker core.QueueWorker } -func NewURLNotifier(params URLNotifierParams) *URLNotifier { +func NewDefaultURLNotifier(params URLNotifierParams) URLNotifier { if params.QueueSize == 0 { params.QueueSize = defaultQueueSize } @@ -60,7 +66,7 @@ func NewURLNotifier(params URLNotifierParams) *URLNotifier { params.Logger = logger.GetLogger() } - n := &URLNotifier{ + n := &DefaultURLNotifier{ params: params, client: retryablehttp.NewClient(), } @@ -73,14 +79,14 @@ func NewURLNotifier(params URLNotifierParams) *URLNotifier { return n } -func (n *URLNotifier) SetKeys(apiKey, apiSecret string) { +func (n *DefaultURLNotifier) SetKeys(apiKey, apiSecret string) { n.mu.Lock() defer n.mu.Unlock() n.params.APIKey = apiKey n.params.APISecret = apiSecret } -func (n *URLNotifier) QueueNotify(event *livekit.WebhookEvent) error { +func (n *DefaultURLNotifier) QueueNotify(event *livekit.WebhookEvent) error { n.worker.Submit(func() { if err := n.send(event); err != nil { n.params.Logger.Warnw("failed to send webhook", err, "url", n.params.URL, "event", event.Event) @@ -92,7 +98,7 @@ func (n *URLNotifier) QueueNotify(event *livekit.WebhookEvent) error { return nil } -func (n *URLNotifier) Stop(force bool) { +func (n *DefaultURLNotifier) Stop(force bool) { if force { n.worker.Kill() } else { @@ -100,7 +106,7 @@ func (n *URLNotifier) Stop(force bool) { } } -func (n *URLNotifier) send(event *livekit.WebhookEvent) error { +func (n *DefaultURLNotifier) send(event *livekit.WebhookEvent) error { // set dropped count event.NumDropped = n.dropped.Swap(0) event.DequeuedAt = time.Now().Unix() diff --git a/webhook/verifier.go b/webhook/verifier.go index 32964b8ec..f0b193e9c 100644 --- a/webhook/verifier.go +++ b/webhook/verifier.go @@ -82,3 +82,21 @@ func ReceiveWebhookEvent(r *http.Request, provider auth.KeyProvider) (*livekit.W } return &event, nil } + +func ReceiveWebhookEventBatched(r *http.Request, provider auth.KeyProvider) ([]*livekit.WebhookEvent, error) { + data, err := Receive(r, provider) + if err != nil { + return nil, err + } + unmarshalOpts := protojson.UnmarshalOptions{ + DiscardUnknown: true, + AllowPartial: true, + } + + events := livekit.BatchedWebhookEvents{} + if err = unmarshalOpts.Unmarshal(data, &events); err != nil { + return nil, err + } + + return events.Events, nil +} diff --git a/webhook/webhook_test.go b/webhook/webhook_test.go index c12a31adf..02cd87636 100644 --- a/webhook/webhook_test.go +++ b/webhook/webhook_test.go @@ -47,6 +47,7 @@ func TestWebHook(t *testing.T) { defer s.Stop() notifier := NewDefaultNotifier(apiKey, apiSecret, []string{testUrl}) + defer notifier.Stop(true) t.Run("test event payload", func(t *testing.T) { event := &livekit.WebhookEvent{ @@ -74,6 +75,46 @@ func TestWebHook(t *testing.T) { } +func TestBatchWebHook(t *testing.T) { + s := newServer(testAddr) + require.NoError(t, s.Start()) + defer s.Stop() + + notifier := NewBatchedNotifier(context.Background(), apiKey, apiSecret, []string{testUrl}) + defer notifier.Stop(true) + + t.Run("test events payload", func(t *testing.T) { + event := &livekit.WebhookEvent{ + Event: EventTrackPublished, + Participant: &livekit.ParticipantInfo{ + Identity: "test", + }, + Track: &livekit.TrackInfo{ + Sid: "TR_abcde", + }, + } + + wg := sync.WaitGroup{} + wg.Add(1) + s.handler = func(r *http.Request) { + defer wg.Done() + decodedEvent, err := ReceiveWebhookEventBatched(r, authProvider) + require.NoError(t, err) + + require.Equal(t, 3, len(decodedEvent)) + for _, ev := range decodedEvent { + require.EqualValues(t, event, ev) + } + } + // send 3 times + require.NoError(t, notifier.QueueNotify(context.Background(), event)) + require.NoError(t, notifier.QueueNotify(context.Background(), event)) + require.NoError(t, notifier.QueueNotify(context.Background(), event)) + wg.Wait() + }) + +} + func TestURLNotifierDropped(t *testing.T) { s := newServer(testAddr) require.NoError(t, s.Start()) @@ -170,8 +211,8 @@ func TestURLNotifierLifecycle(t *testing.T) { }) } -func newTestNotifier(dropWhenFull bool) *URLNotifier { - return NewURLNotifier(URLNotifierParams{ +func newTestNotifier(dropWhenFull bool) URLNotifier { + return NewDefaultURLNotifier(URLNotifierParams{ QueueSize: 20, URL: testUrl, APIKey: apiKey,