Skip to content
File

Blob: spec/protocol/transport.pb.go

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