github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1/broker_msgs.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.devices.v1;
     4  
     5  option go_package = "github.com/cloudwan/edgelq-sdk/devices/client/v1/broker";
     6  option java_multiple_files = false;
     7  option java_outer_classname = "BrokerCustomProto";
     8  option java_package = "com.ntt.devices.pb.v1";
     9  
    10  // Services on the device that the client connects to
    11  message SSHService {
    12    message Hello {
    13      string user = 1;
    14  
    15      repeated string command = 2;
    16  
    17      // Environment (optional)
    18      map<string, string> env = 3;
    19    }
    20  
    21    message TerminalSize {
    22      uint32 width = 1;
    23  
    24      uint32 height = 2;
    25    }
    26  
    27    message ClientOut {
    28      oneof msg {
    29        bytes data = 1;
    30  
    31        Hello ssh_hello = 2;
    32  
    33        TerminalSize ssh_resize_terminal = 3;
    34      }
    35    }
    36  
    37    message ClientIn {
    38      oneof msg { bytes data = 1; }
    39    }
    40  }
    41  
    42  message SCPService {
    43    oneof msg {
    44      // Request to create a directory
    45      CreateDirectory dir = 1;
    46  
    47      // Request to create a file
    48      CreateFile file = 2;
    49  
    50      // Request to end SCP transfer
    51      bool eot = 3;
    52  
    53      // Request SCP configuration
    54      Configure config = 4;
    55    }
    56  
    57    message Configure {
    58      bool recursive = 1;
    59  
    60      Direction direction = 2;
    61  
    62      string path = 3;
    63  
    64      enum Direction {
    65        DOWNLOAD = 0;
    66  
    67        UPLOAD = 1;
    68      }
    69    }
    70  
    71    message CreateDirectory {
    72      string path = 1;
    73  
    74      uint32 mode = 2;
    75    }
    76  
    77    message CreateFile {
    78      oneof msg {
    79        // Request file initialization
    80        Initialize init = 1;
    81  
    82        // Request file data
    83        bytes data = 2;
    84  
    85        // Request to end file transfer
    86        bool eof = 3;
    87      }
    88  
    89      message Initialize {
    90        string path = 1;
    91  
    92        uint32 mode = 2;
    93  
    94        uint64 size = 3;
    95      }
    96    }
    97  }
    98  
    99  message LogsService {
   100    // Messages sent only to a device
   101    message ToDevice {
   102      // Live follow the logs service
   103      bool follow = 1;
   104  
   105      // Number of lines to get from the logs service
   106      uint32 lines = 2;
   107  
   108      // Source of the logs service (e.g. docker container ID)
   109      string source = 3;
   110    }
   111  
   112    // Messages sent only to a client
   113    message ToClient {
   114      // Logs data
   115      bytes data = 1;
   116    }
   117  }
   118  
   119  message PodManagementService {
   120    // Pod state command
   121    PodState command = 1;
   122  
   123    // Pod to execute the command on
   124    string pod = 2;
   125  
   126    // Service (container) name to execute the command on (empty = acts on the
   127    // entire pod)
   128    string service = 3;
   129  
   130    // Commands for pod state management
   131    enum PodState {
   132      // Unspecified pod state
   133      UNSPECIFIED = 0;
   134  
   135      // Start the pod
   136      START = 1;
   137  
   138      // Stop the pod
   139      STOP = 2;
   140  
   141      // Restart the pod
   142      RESTART = 3;
   143    }
   144  }
   145  
   146  message SystemStateService {
   147    // Commands for system state management
   148    enum SystemState {
   149      // Unspecified system state
   150      UNSPECIFIED = 0;
   151  
   152      // Shutdown the system
   153      SHUTDOWN = 1;
   154  
   155      // Reboot the system
   156      REBOOT = 2;
   157    }
   158  }
   159  
   160  // Broker dedicated messages
   161  enum BrokerServiceType {
   162    // Service type not specified
   163    BROKER_SERVICE_UNSPECIFIED = 0;
   164  
   165    // SSH service
   166    BROKER_SERVICE_SSH_LEGACY = 1;
   167  
   168    BROKER_SERVICE_SSH = 3;
   169  
   170    // TCP port forward service
   171    BROKER_SERVICE_TCP_FORWARD_PORT = 2;
   172  
   173    // Reboot service
   174    BROKER_SERVICE_REBOOT = 4;
   175  
   176    // Shutdown service
   177    BROKER_SERVICE_SHUTDOWN = 5;
   178  
   179    // SCP service
   180    BROKER_SERVICE_SCP = 6;
   181  
   182    BROKER_SERVICE_SCP_LEGACY = 7;
   183  
   184    // System Logs service
   185    BROKER_SYS_LOGS = 8;
   186  
   187    // Application (Container) Logs service
   188    BROKER_APP_LOGS = 9;
   189  
   190    // Pod State Management service
   191    BROKER_POD_MANAGEMENT = 10;
   192  }