github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/cmd/rony/skel/proto/msg.proto (about)

     1  syntax = "proto3";
     2  package rony;
     3  
     4  // MessageEnvelope
     5  // This type of message will be used to contain another ProtoBuffer Message inside
     6  message MessageEnvelope {
     7      uint64 Constructor = 1 [jstype = JS_STRING];
     8      fixed64 RequestID = 2;
     9      bytes Message = 4;
    10      bytes Auth = 8;
    11      repeated KeyValue Header = 10;
    12  }
    13  
    14  message Ping {
    15      int64 ID = 1;
    16  }
    17  
    18  message Pong {
    19      int64 ID = 2;
    20  }
    21  
    22  
    23  // KeyValue
    24  message KeyValue {
    25      string Key = 1;
    26      string Value = 2;
    27  }
    28  
    29  // MessageContainer
    30  // This type of message will be used to send multi messages inside a single container message
    31  message MessageContainer {
    32      int32 Length = 1;
    33      repeated MessageEnvelope Envelopes = 2;
    34      // SyncRun makes the execution in sequence if it is TRUE
    35      bool SyncRun = 3;
    36  }
    37  
    38  // Error
    39  message Error {
    40      string Code = 1;
    41      string Items = 2;
    42      string Description = 3;
    43  }
    44  
    45  // RedirectReason
    46  enum RedirectReason {
    47      ReplicaSetSession = 0;
    48      ReplicaSetRequest = 1;
    49      Reserved1 = 3;
    50      Reserved2 = 4;
    51      Reserved3 = 5;
    52      Reserved4 = 6;
    53  }
    54  
    55  // Redirect
    56  message Redirect {
    57      RedirectReason Reason = 100;
    58      repeated Edge Edges = 2;
    59      uint32 WaitInSec = 3;
    60  }
    61  
    62  // Edge
    63  message Edge {
    64      uint64 ReplicaSet = 1;
    65      string ServerID = 2;
    66      repeated string HostPorts = 3;
    67  }
    68  
    69  // Edges
    70  message Edges {
    71      repeated Edge Nodes = 1;
    72  }
    73  
    74  // GetNodes
    75  // @Function
    76  // @Return: Edges
    77  message GetNodes {
    78      repeated uint64 ReplicaSet = 1;
    79  }
    80  
    81  // GetNodes
    82  // @Function
    83  // @Return: Edges
    84  message GetAllNodes {
    85  }
    86  
    87  // HttpBody used by REST proxies to fill the output.
    88  message HttpBody {
    89      string ContentType = 1;
    90      repeated KeyValue Header = 2;
    91      bytes Body = 3;
    92  }