Skip to content

Commit

Permalink
add psrpc redis keepalive (#582)
Browse files Browse the repository at this point in the history
* add psrpc redis keepalive

* generated protobuf

* codegen

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
paulwe and github-actions[bot] authored Jan 21, 2024
1 parent 9430659 commit 9e82495
Show file tree
Hide file tree
Showing 16 changed files with 957 additions and 999 deletions.
1,224 changes: 277 additions & 947 deletions livekit/livekit_internal.pb.go

Large diffs are not rendered by default.

46 changes: 0 additions & 46 deletions livekit_internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ option ruby_package = "LiveKit::Proto";

// internal protos, not exposed to clients
import "livekit_models.proto";
import "livekit_rtc.proto";
import "livekit_room.proto";
import "livekit_egress.proto";

enum NodeType {
Expand Down Expand Up @@ -114,40 +112,6 @@ message NodeStats {
// NEXT ID: 48
}

// message to RTC nodes
message RTCNodeMessage {
string participant_key = 1 [deprecated=true];
int64 sender_time = 11;
string connection_id = 13 [deprecated=true];
string participant_key_b62 = 14 [deprecated=true];
string room_name = 15 [deprecated=true];
string identity = 16 [deprecated=true];
oneof message {
StartSession start_session = 2 [deprecated=true];
SignalRequest request = 3 [deprecated=true];
// internal messages
RoomParticipantIdentity remove_participant = 4 [deprecated=true];
MuteRoomTrackRequest mute_track = 5 [deprecated=true];
UpdateParticipantRequest update_participant = 6 [deprecated=true];
DeleteRoomRequest delete_room = 7 [deprecated=true];
UpdateSubscriptionsRequest update_subscriptions = 8 [deprecated=true];
SendDataRequest send_data = 9 [deprecated=true];
UpdateRoomMetadataRequest update_room_metadata = 10 [deprecated=true];
KeepAlive keep_alive = 12;
}

// NEXT ID: 17
}

// message to Signal nodes
message SignalNodeMessage {
string connection_id = 1;
oneof message {
SignalResponse response = 2;
EndSession end_session = 3;
}
}

message StartSession {
string room_name = 1;
string identity = 2;
Expand All @@ -168,16 +132,6 @@ message StartSession {
optional bool subscriber_allow_pause = 18;
}

message EndSession {
}

message RemoveParticipant {
string participant_id = 1;
}

message KeepAlive {
}

// room info that should not be returned to clients
message RoomInternal {
AutoTrackEgress track_egress = 1;
Expand Down
5 changes: 3 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ func Proto() error {
"rpc/agent.proto",
"rpc/egress.proto",
"rpc/ingress.proto",
"rpc/sip.proto",
"rpc/io.proto",
"rpc/room.proto",
"rpc/keepalive.proto",
"rpc/participant.proto",
"rpc/room.proto",
"rpc/signal.proto",
"rpc/sip.proto",
}

fmt.Println("generating protobuf")
Expand Down
2 changes: 1 addition & 1 deletion rpc/io.psrpc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 168 additions & 0 deletions rpc/keepalive.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions rpc/keepalive.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2023 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package rpc;

option go_package = "github.com/livekit/livekit/pkg/service/rpc";

import "options.proto";

service Keepalive {
rpc Ping(KeepalivePing) returns (KeepalivePing) {
option (psrpc.options) = {
subscription: true
multi: true
topics: true
topic_params: {
names: ["nodeID"]
typed: true
};
};
};
}

message KeepalivePing {
int64 timestamp = 1;
}
Loading

0 comments on commit 9e82495

Please sign in to comment.