forked from livekit/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlivekit_internal.proto
179 lines (157 loc) · 4.22 KB
/
livekit_internal.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
syntax = "proto3";
package livekit;
option go_package = "github.com/livekit/protocol/livekit";
option csharp_namespace = "LiveKit.Proto";
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 {
SERVER = 0;
CONTROLLER = 1;
MEDIA = 2;
TURN = 4;
SWEEPER = 5;
}
enum NodeState {
STARTING_UP = 0;
SERVING = 1;
SHUTTING_DOWN = 2;
}
message Node {
string id = 1;
string ip = 2;
uint32 num_cpus = 3;
NodeStats stats = 4;
NodeType type = 5;
NodeState state = 6;
string region = 7;
}
message NodeStats {
// when server was started
int64 started_at = 1;
// when server last reported its status
int64 updated_at = 2;
// room
int32 num_rooms = 3;
int32 num_clients = 4;
int32 num_tracks_in = 5;
int32 num_tracks_out = 6;
int32 num_track_publish_attempts = 36;
float track_publish_attempts_per_sec = 37;
int32 num_track_publish_success = 38;
float track_publish_success_per_sec = 39;
int32 num_track_subscribe_attempts = 40;
float track_subscribe_attempts_per_sec = 41;
int32 num_track_subscribe_success = 42;
float track_subscribe_success_per_sec = 43;
// packet
uint64 bytes_in = 7;
uint64 bytes_out = 8;
uint64 packets_in = 9;
uint64 packets_out = 10;
uint64 nack_total = 11;
float bytes_in_per_sec = 12;
float bytes_out_per_sec = 13;
float packets_in_per_sec = 14;
float packets_out_per_sec = 15;
float nack_per_sec = 16;
// system
uint32 num_cpus = 17;
float load_avg_last1min = 18;
float load_avg_last5min = 19;
float load_avg_last15min = 20;
float cpu_load = 21;
float memory_load = 33; // deprecated
uint64 memory_total = 34;
uint64 memory_used = 35;
uint32 sys_packets_out = 28;
uint32 sys_packets_dropped = 29;
float sys_packets_out_per_sec = 30;
float sys_packets_dropped_per_sec = 31;
float sys_packets_dropped_pct_per_sec = 32;
// retransmissions
uint64 retransmit_bytes_out = 22;
uint64 retransmit_packets_out = 23;
float retransmit_bytes_out_per_sec = 24;
float retransmit_packets_out_per_sec = 25;
// participant joins
uint64 participant_signal_connected = 26;
float participant_signal_connected_per_sec = 27;
uint64 participant_rtc_connected = 44;
float participant_rtc_connected_per_sec = 45;
uint64 participant_rtc_init = 46;
float participant_rtc_init_per_sec = 47;
// NEXT ID: 48
}
// message to RTC nodes
message RTCNodeMessage {
string participant_key = 1;
int64 sender_time = 11;
string connection_id = 13;
string participant_key_b62 = 14;
string room_name = 15;
string identity = 16;
oneof message {
StartSession start_session = 2;
SignalRequest request = 3;
// internal messages
RoomParticipantIdentity remove_participant = 4;
MuteRoomTrackRequest mute_track = 5;
UpdateParticipantRequest update_participant = 6;
DeleteRoomRequest delete_room = 7;
UpdateSubscriptionsRequest update_subscriptions = 8;
SendDataRequest send_data = 9;
UpdateRoomMetadataRequest update_room_metadata = 10;
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;
string connection_id = 3;
// if a client is reconnecting (i.e. resume instead of restart)
bool reconnect = 4;
bool auto_subscribe = 9;
bool hidden = 10;
ClientInfo client = 11;
bool recorder = 12;
string name = 13;
// A user's ClaimGrants serialized in JSON
string grants_json = 14;
bool adaptive_stream = 15;
//if reconnect, client will set current sid
string participant_id = 16;
ReconnectReason reconnect_reason = 17;
}
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;
}
enum ICECandidateType {
ICT_NONE = 0;
ICT_TCP = 1;
ICT_TLS = 2;
}
message ICEConfig {
ICECandidateType preference_subscriber = 1;
ICECandidateType preference_publisher = 2;
}