github.com/livekit/protocol@v1.16.1-0.20240517185851-47e4c6bba773/protobufs/livekit_internal.proto (about)

     1  // Copyright 2023 LiveKit, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package livekit;
    18  option go_package = "github.com/livekit/protocol/livekit";
    19  option csharp_namespace = "LiveKit.Proto";
    20  option ruby_package = "LiveKit::Proto";
    21  
    22  // internal protos, not exposed to clients
    23  import "livekit_models.proto";
    24  import "livekit_egress.proto";
    25  
    26  enum NodeType {
    27    SERVER = 0;
    28    CONTROLLER = 1;
    29    MEDIA = 2;
    30    TURN = 4;
    31    SWEEPER = 5;
    32    DIRECTOR = 6;
    33  }
    34  
    35  enum NodeState {
    36    STARTING_UP = 0;
    37    SERVING = 1;
    38    SHUTTING_DOWN = 2;
    39  }
    40  
    41  message Node {
    42    string id = 1;
    43    string ip = 2;
    44    uint32 num_cpus = 3;
    45    NodeStats stats = 4;
    46    NodeType type = 5;
    47    NodeState state = 6;
    48    string region = 7;
    49  }
    50  
    51  message NodeStats {
    52    // when server was started
    53    int64 started_at = 1;
    54    // when server last reported its status
    55    int64 updated_at = 2;
    56  
    57    // room
    58    int32 num_rooms = 3;
    59    int32 num_clients = 4;
    60    int32 num_tracks_in = 5;
    61    int32 num_tracks_out = 6;
    62    int32 num_track_publish_attempts = 36;
    63    float track_publish_attempts_per_sec = 37;
    64    int32 num_track_publish_success = 38;
    65    float track_publish_success_per_sec = 39;
    66    int32 num_track_subscribe_attempts = 40;
    67    float track_subscribe_attempts_per_sec = 41;
    68    int32 num_track_subscribe_success = 42;
    69    float track_subscribe_success_per_sec = 43;
    70  
    71    // packet
    72    uint64 bytes_in = 7;
    73    uint64 bytes_out = 8;
    74    uint64 packets_in = 9;
    75    uint64 packets_out = 10;
    76    uint64 nack_total = 11;
    77    float bytes_in_per_sec = 12;
    78    float bytes_out_per_sec = 13;
    79    float packets_in_per_sec = 14;
    80    float packets_out_per_sec = 15;
    81    float nack_per_sec = 16;
    82  
    83    // system
    84    uint32 num_cpus = 17;
    85    float load_avg_last1min = 18;
    86    float load_avg_last5min = 19;
    87    float load_avg_last15min = 20;
    88    float cpu_load = 21;
    89    float memory_load = 33; // deprecated
    90    uint64 memory_total = 34;
    91    uint64 memory_used = 35;
    92    uint32 sys_packets_out = 28;
    93    uint32 sys_packets_dropped = 29;
    94    float sys_packets_out_per_sec = 30;
    95    float sys_packets_dropped_per_sec = 31;
    96    float sys_packets_dropped_pct_per_sec = 32;
    97  
    98    // retransmissions
    99    uint64 retransmit_bytes_out = 22;
   100    uint64 retransmit_packets_out = 23;
   101    float retransmit_bytes_out_per_sec = 24;
   102    float retransmit_packets_out_per_sec = 25;
   103  
   104    // participant joins
   105    uint64 participant_signal_connected = 26;
   106    float participant_signal_connected_per_sec = 27;
   107    uint64 participant_rtc_connected = 44;
   108    float participant_rtc_connected_per_sec = 45;
   109    uint64 participant_rtc_init = 46;
   110    float participant_rtc_init_per_sec = 47;
   111  
   112    // NEXT ID: 48
   113  }
   114  
   115  message StartSession {
   116    string room_name = 1;
   117    string identity = 2;
   118    string connection_id = 3;
   119    // if a client is reconnecting (i.e. resume instead of restart)
   120    bool reconnect = 4;
   121    bool auto_subscribe = 9;
   122    bool hidden = 10;
   123    ClientInfo client = 11;
   124    bool recorder = 12;
   125    string name = 13;
   126    // A user's ClaimGrants serialized in JSON
   127    string grants_json = 14;
   128    bool adaptive_stream = 15;
   129    //if reconnect, client will set current sid
   130    string participant_id = 16;
   131    ReconnectReason reconnect_reason = 17;
   132    optional bool subscriber_allow_pause = 18;
   133  }
   134  
   135  // room info that should not be returned to clients
   136  message RoomInternal {
   137    AutoTrackEgress track_egress = 1;
   138    AutoParticipantEgress participant_egress = 2;
   139    PlayoutDelay playout_delay = 3;
   140    bool sync_streams = 4;
   141  }
   142  
   143  enum ICECandidateType {
   144    ICT_NONE = 0;
   145    ICT_TCP = 1;
   146    ICT_TLS = 2;
   147  }
   148  
   149  message ICEConfig {
   150    ICECandidateType preference_subscriber = 1;
   151    ICECandidateType preference_publisher = 2;
   152  }