Skip to content
File

Blob: spec/protocol/transport.pb.go

go513 lines
1// Code generated by protoc-gen-go. DO NOT EDIT.
2// versions:
3// protoc-gen-go v1.36.12
4// protoc v7.34.0
5// source: spec/proto/transport.proto
6 
7package protocol
8 
9import (
10 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 reflect "reflect"
13 sync "sync"
14 unsafe "unsafe"
15)
16 
17const (
18 // Verify that this generated code is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20 // Verify that runtime/protoimpl is sufficiently up-to-date.
21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22)
23 
24type Stream_Type int32
25 
26const (
27 Stream_UNKNOWN_TYPE Stream_Type = 0
28 Stream_RPC Stream_Type = 1 // used for rpc between nodes and between client/server
29 Stream_DIRECT Stream_Type = 2 // used for establishing the reverse proxy from the tunneling node to client
30 Stream_PROXY Stream_Type = 3 // used when client is not directly connected to the tunneling node
31 Stream_INTERNAL Stream_Type = 4 // used for /_internal endpoint proxying between nodes
32 Stream_CONFIG Stream_Type = 5 // used for shared configuration between authenticated physical Chord peers
33)
34 
35// Enum value maps for Stream_Type.
36var (
37 Stream_Type_name = map[int32]string{
38 0: "UNKNOWN_TYPE",
39 1: "RPC",
40 2: "DIRECT",
41 3: "PROXY",
42 4: "INTERNAL",
43 5: "CONFIG",
44 }
45 Stream_Type_value = map[string]int32{
46 "UNKNOWN_TYPE": 0,
47 "RPC": 1,
48 "DIRECT": 2,
49 "PROXY": 3,
50 "INTERNAL": 4,
51 "CONFIG": 5,
52 }
53)
54 
55func (x Stream_Type) Enum() *Stream_Type {
56 p := new(Stream_Type)
57 *p = x
58 return p
59}
60 
61func (x Stream_Type) String() string {
62 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
63}
64 
65func (Stream_Type) Descriptor() protoreflect.EnumDescriptor {
66 return file_spec_proto_transport_proto_enumTypes[0].Descriptor()
67}
68 
69func (Stream_Type) Type() protoreflect.EnumType {
70 return &file_spec_proto_transport_proto_enumTypes[0]
71}
72 
73func (x Stream_Type) Number() protoreflect.EnumNumber {
74 return protoreflect.EnumNumber(x)
75}
76 
77// Deprecated: Use Stream_Type.Descriptor instead.
78func (Stream_Type) EnumDescriptor() ([]byte, []int) {
79 return file_spec_proto_transport_proto_rawDescGZIP(), []int{0, 0}
80}
81 
82type Datagram_Type int32
83 
84const (
85 Datagram_UNKNOWN Datagram_Type = 0
86 Datagram_ALIVE Datagram_Type = 1
87 Datagram_DATA Datagram_Type = 2
88 Datagram_RTT_SYN Datagram_Type = 3
89 Datagram_RTT_ACK Datagram_Type = 4
90)
91 
92// Enum value maps for Datagram_Type.
93var (
94 Datagram_Type_name = map[int32]string{
95 0: "UNKNOWN",
96 1: "ALIVE",
97 2: "DATA",
98 3: "RTT_SYN",
99 4: "RTT_ACK",
100 }
101 Datagram_Type_value = map[string]int32{
102 "UNKNOWN": 0,
103 "ALIVE": 1,
104 "DATA": 2,
105 "RTT_SYN": 3,
106 "RTT_ACK": 4,
107 }
108)
109 
110func (x Datagram_Type) Enum() *Datagram_Type {
111 p := new(Datagram_Type)
112 *p = x
113 return p
114}
115 
116func (x Datagram_Type) String() string {
117 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
118}
119 
120func (Datagram_Type) Descriptor() protoreflect.EnumDescriptor {
121 return file_spec_proto_transport_proto_enumTypes[1].Descriptor()
122}
123 
124func (Datagram_Type) Type() protoreflect.EnumType {
125 return &file_spec_proto_transport_proto_enumTypes[1]
126}
127 
128func (x Datagram_Type) Number() protoreflect.EnumNumber {
129 return protoreflect.EnumNumber(x)
130}
131 
132// Deprecated: Use Datagram_Type.Descriptor instead.
133func (Datagram_Type) EnumDescriptor() ([]byte, []int) {
134 return file_spec_proto_transport_proto_rawDescGZIP(), []int{1, 0}
135}
136 
137type Connection_State int32
138 
139const (
140 Connection_UNKNOWN_STATE Connection_State = 0
141 Connection_CACHED Connection_State = 1
142 Connection_FRESH Connection_State = 2
143)
144 
145// Enum value maps for Connection_State.
146var (
147 Connection_State_name = map[int32]string{
148 0: "UNKNOWN_STATE",
149 1: "CACHED",
150 2: "FRESH",
151 }
152 Connection_State_value = map[string]int32{
153 "UNKNOWN_STATE": 0,
154 "CACHED": 1,
155 "FRESH": 2,
156 }
157)
158 
159func (x Connection_State) Enum() *Connection_State {
160 p := new(Connection_State)
161 *p = x
162 return p
163}
164 
165func (x Connection_State) String() string {
166 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
167}
168 
169func (Connection_State) Descriptor() protoreflect.EnumDescriptor {
170 return file_spec_proto_transport_proto_enumTypes[2].Descriptor()
171}
172 
173func (Connection_State) Type() protoreflect.EnumType {
174 return &file_spec_proto_transport_proto_enumTypes[2]
175}
176 
177func (x Connection_State) Number() protoreflect.EnumNumber {
178 return protoreflect.EnumNumber(x)
179}
180 
181// Deprecated: Use Connection_State.Descriptor instead.
182func (Connection_State) EnumDescriptor() ([]byte, []int) {
183 return file_spec_proto_transport_proto_rawDescGZIP(), []int{2, 0}
184}
185 
186type Connection_Direction int32
187 
188const (
189 Connection_UNKNOWN_DIRECTION Connection_Direction = 0
190 Connection_INCOMING Connection_Direction = 1
191 Connection_OUTGOING Connection_Direction = 2
192)
193 
194// Enum value maps for Connection_Direction.
195var (
196 Connection_Direction_name = map[int32]string{
197 0: "UNKNOWN_DIRECTION",
198 1: "INCOMING",
199 2: "OUTGOING",
200 }
201 Connection_Direction_value = map[string]int32{
202 "UNKNOWN_DIRECTION": 0,
203 "INCOMING": 1,
204 "OUTGOING": 2,
205 }
206)
207 
208func (x Connection_Direction) Enum() *Connection_Direction {
209 p := new(Connection_Direction)
210 *p = x
211 return p
212}
213 
214func (x Connection_Direction) String() string {
215 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
216}
217 
218func (Connection_Direction) Descriptor() protoreflect.EnumDescriptor {
219 return file_spec_proto_transport_proto_enumTypes[3].Descriptor()
220}
221 
222func (Connection_Direction) Type() protoreflect.EnumType {
223 return &file_spec_proto_transport_proto_enumTypes[3]
224}
225 
226func (x Connection_Direction) Number() protoreflect.EnumNumber {
227 return protoreflect.EnumNumber(x)
228}
229 
230// Deprecated: Use Connection_Direction.Descriptor instead.
231func (Connection_Direction) EnumDescriptor() ([]byte, []int) {
232 return file_spec_proto_transport_proto_rawDescGZIP(), []int{2, 1}
233}
234 
235type Stream struct {
236 state protoimpl.MessageState `protogen:"open.v1"`
237 Type Stream_Type `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.Stream_Type" json:"type,omitempty"`
238 Target *Node `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
239 unknownFields protoimpl.UnknownFields
240 sizeCache protoimpl.SizeCache
241}
242 
243func (x *Stream) Reset() {
244 *x = Stream{}
245 mi := &file_spec_proto_transport_proto_msgTypes[0]
246 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
247 ms.StoreMessageInfo(mi)
248}
249 
250func (x *Stream) String() string {
251 return protoimpl.X.MessageStringOf(x)
252}
253 
254func (*Stream) ProtoMessage() {}
255 
256func (x *Stream) ProtoReflect() protoreflect.Message {
257 mi := &file_spec_proto_transport_proto_msgTypes[0]
258 if x != nil {
259 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
260 if ms.LoadMessageInfo() == nil {
261 ms.StoreMessageInfo(mi)
262 }
263 return ms
264 }
265 return mi.MessageOf(x)
266}
267 
268// Deprecated: Use Stream.ProtoReflect.Descriptor instead.
269func (*Stream) Descriptor() ([]byte, []int) {
270 return file_spec_proto_transport_proto_rawDescGZIP(), []int{0}
271}
272 
273func (x *Stream) GetType() Stream_Type {
274 if x != nil {
275 return x.Type
276 }
277 return Stream_UNKNOWN_TYPE
278}
279 
280func (x *Stream) GetTarget() *Node {
281 if x != nil {
282 return x.Target
283 }
284 return nil
285}
286 
287type Datagram struct {
288 state protoimpl.MessageState `protogen:"open.v1"`
289 Type Datagram_Type `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.Datagram_Type" json:"type,omitempty"`
290 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
291 unknownFields protoimpl.UnknownFields
292 sizeCache protoimpl.SizeCache
293}
294 
295func (x *Datagram) Reset() {
296 *x = Datagram{}
297 mi := &file_spec_proto_transport_proto_msgTypes[1]
298 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
299 ms.StoreMessageInfo(mi)
300}
301 
302func (x *Datagram) String() string {
303 return protoimpl.X.MessageStringOf(x)
304}
305 
306func (*Datagram) ProtoMessage() {}
307 
308func (x *Datagram) ProtoReflect() protoreflect.Message {
309 mi := &file_spec_proto_transport_proto_msgTypes[1]
310 if x != nil {
311 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
312 if ms.LoadMessageInfo() == nil {
313 ms.StoreMessageInfo(mi)
314 }
315 return ms
316 }
317 return mi.MessageOf(x)
318}
319 
320// Deprecated: Use Datagram.ProtoReflect.Descriptor instead.
321func (*Datagram) Descriptor() ([]byte, []int) {
322 return file_spec_proto_transport_proto_rawDescGZIP(), []int{1}
323}
324 
325func (x *Datagram) GetType() Datagram_Type {
326 if x != nil {
327 return x.Type
328 }
329 return Datagram_UNKNOWN
330}
331 
332func (x *Datagram) GetData() []byte {
333 if x != nil {
334 return x.Data
335 }
336 return nil
337}
338 
339type Connection struct {
340 state protoimpl.MessageState `protogen:"open.v1"`
341 Identity *Node `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
342 CacheState Connection_State `protobuf:"varint,2,opt,name=cache_state,json=cacheState,proto3,enum=protocol.Connection_State" json:"cache_state,omitempty"`
343 CacheDirection Connection_Direction `protobuf:"varint,3,opt,name=cache_direction,json=cacheDirection,proto3,enum=protocol.Connection_Direction" json:"cache_direction,omitempty"`
344 Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
345 unknownFields protoimpl.UnknownFields
346 sizeCache protoimpl.SizeCache
347}
348 
349func (x *Connection) Reset() {
350 *x = Connection{}
351 mi := &file_spec_proto_transport_proto_msgTypes[2]
352 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
353 ms.StoreMessageInfo(mi)
354}
355 
356func (x *Connection) String() string {
357 return protoimpl.X.MessageStringOf(x)
358}
359 
360func (*Connection) ProtoMessage() {}
361 
362func (x *Connection) ProtoReflect() protoreflect.Message {
363 mi := &file_spec_proto_transport_proto_msgTypes[2]
364 if x != nil {
365 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
366 if ms.LoadMessageInfo() == nil {
367 ms.StoreMessageInfo(mi)
368 }
369 return ms
370 }
371 return mi.MessageOf(x)
372}
373 
374// Deprecated: Use Connection.ProtoReflect.Descriptor instead.
375func (*Connection) Descriptor() ([]byte, []int) {
376 return file_spec_proto_transport_proto_rawDescGZIP(), []int{2}
377}
378 
379func (x *Connection) GetIdentity() *Node {
380 if x != nil {
381 return x.Identity
382 }
383 return nil
384}
385 
386func (x *Connection) GetCacheState() Connection_State {
387 if x != nil {
388 return x.CacheState
389 }
390 return Connection_UNKNOWN_STATE
391}
392 
393func (x *Connection) GetCacheDirection() Connection_Direction {
394 if x != nil {
395 return x.CacheDirection
396 }
397 return Connection_UNKNOWN_DIRECTION
398}
399 
400func (x *Connection) GetVersion() string {
401 if x != nil {
402 return x.Version
403 }
404 return ""
405}
406 
407var File_spec_proto_transport_proto protoreflect.FileDescriptor
408 
409const file_spec_proto_transport_proto_rawDesc = "" +
410 "\n" +
411 "\x1aspec/proto/transport.proto\x12\bprotocol\x1a\x15spec/proto/node.proto\"\xaf\x01\n" +
412 "\x06Stream\x12)\n" +
413 "\x04type\x18\x01 \x01(\x0e2\x15.protocol.Stream.TypeR\x04type\x12&\n" +
414 "\x06target\x18\x02 \x01(\v2\x0e.protocol.NodeR\x06target\"R\n" +
415 "\x04Type\x12\x10\n" +
416 "\fUNKNOWN_TYPE\x10\x00\x12\a\n" +
417 "\x03RPC\x10\x01\x12\n" +
418 "\n" +
419 "\x06DIRECT\x10\x02\x12\t\n" +
420 "\x05PROXY\x10\x03\x12\f\n" +
421 "\bINTERNAL\x10\x04\x12\n" +
422 "\n" +
423 "\x06CONFIG\x10\x05\"\x8f\x01\n" +
424 "\bDatagram\x12+\n" +
425 "\x04type\x18\x01 \x01(\x0e2\x17.protocol.Datagram.TypeR\x04type\x12\x12\n" +
426 "\x04data\x18\x02 \x01(\fR\x04data\"B\n" +
427 "\x04Type\x12\v\n" +
428 "\aUNKNOWN\x10\x00\x12\t\n" +
429 "\x05ALIVE\x10\x01\x12\b\n" +
430 "\x04DATA\x10\x02\x12\v\n" +
431 "\aRTT_SYN\x10\x03\x12\v\n" +
432 "\aRTT_ACK\x10\x04\"\xcb\x02\n" +
433 "\n" +
434 "Connection\x12*\n" +
435 "\bidentity\x18\x01 \x01(\v2\x0e.protocol.NodeR\bidentity\x12;\n" +
436 "\vcache_state\x18\x02 \x01(\x0e2\x1a.protocol.Connection.StateR\n" +
437 "cacheState\x12G\n" +
438 "\x0fcache_direction\x18\x03 \x01(\x0e2\x1e.protocol.Connection.DirectionR\x0ecacheDirection\x12\x18\n" +
439 "\aversion\x18\x05 \x01(\tR\aversion\"1\n" +
440 "\x05State\x12\x11\n" +
441 "\rUNKNOWN_STATE\x10\x00\x12\n" +
442 "\n" +
443 "\x06CACHED\x10\x01\x12\t\n" +
444 "\x05FRESH\x10\x02\">\n" +
445 "\tDirection\x12\x15\n" +
446 "\x11UNKNOWN_DIRECTION\x10\x00\x12\f\n" +
447 "\bINCOMING\x10\x01\x12\f\n" +
448 "\bOUTGOING\x10\x02B+H\x01Z'go.miragespace.co/specter/spec/protocolb\x06proto3"
449 
450var (
451 file_spec_proto_transport_proto_rawDescOnce sync.Once
452 file_spec_proto_transport_proto_rawDescData []byte
453)
454 
455func file_spec_proto_transport_proto_rawDescGZIP() []byte {
456 file_spec_proto_transport_proto_rawDescOnce.Do(func() {
457 file_spec_proto_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_spec_proto_transport_proto_rawDesc), len(file_spec_proto_transport_proto_rawDesc)))
458 })
459 return file_spec_proto_transport_proto_rawDescData
460}
461 
462var file_spec_proto_transport_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
463var file_spec_proto_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
464var file_spec_proto_transport_proto_goTypes = []any{
465 (Stream_Type)(0), // 0: protocol.Stream.Type
466 (Datagram_Type)(0), // 1: protocol.Datagram.Type
467 (Connection_State)(0), // 2: protocol.Connection.State
468 (Connection_Direction)(0), // 3: protocol.Connection.Direction
469 (*Stream)(nil), // 4: protocol.Stream
470 (*Datagram)(nil), // 5: protocol.Datagram
471 (*Connection)(nil), // 6: protocol.Connection
472 (*Node)(nil), // 7: protocol.Node
473}
474var file_spec_proto_transport_proto_depIdxs = []int32{
475 0, // 0: protocol.Stream.type:type_name -> protocol.Stream.Type
476 7, // 1: protocol.Stream.target:type_name -> protocol.Node
477 1, // 2: protocol.Datagram.type:type_name -> protocol.Datagram.Type
478 7, // 3: protocol.Connection.identity:type_name -> protocol.Node
479 2, // 4: protocol.Connection.cache_state:type_name -> protocol.Connection.State
480 3, // 5: protocol.Connection.cache_direction:type_name -> protocol.Connection.Direction
481 6, // [6:6] is the sub-list for method output_type
482 6, // [6:6] is the sub-list for method input_type
483 6, // [6:6] is the sub-list for extension type_name
484 6, // [6:6] is the sub-list for extension extendee
485 0, // [0:6] is the sub-list for field type_name
486}
487 
488func init() { file_spec_proto_transport_proto_init() }
489func file_spec_proto_transport_proto_init() {
490 if File_spec_proto_transport_proto != nil {
491 return
492 }
493 file_spec_proto_node_proto_init()
494 type x struct{}
495 out := protoimpl.TypeBuilder{
496 File: protoimpl.DescBuilder{
497 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
498 RawDescriptor: unsafe.Slice(unsafe.StringData(file_spec_proto_transport_proto_rawDesc), len(file_spec_proto_transport_proto_rawDesc)),
499 NumEnums: 4,
500 NumMessages: 3,
501 NumExtensions: 0,
502 NumServices: 0,
503 },
504 GoTypes: file_spec_proto_transport_proto_goTypes,
505 DependencyIndexes: file_spec_proto_transport_proto_depIdxs,
506 EnumInfos: file_spec_proto_transport_proto_enumTypes,
507 MessageInfos: file_spec_proto_transport_proto_msgTypes,
508 }.Build()
509 File_spec_proto_transport_proto = out.File
510 file_spec_proto_transport_proto_goTypes = nil
511 file_spec_proto_transport_proto_depIdxs = nil
512}