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