binarylog.pb.go raw
1 // Copyright 2018 The gRPC Authors
2 // All rights reserved.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15
16 // The canonical version of this proto can be found at
17 // https://github.com/grpc/grpc-proto/blob/master/grpc/binlog/v1/binarylog.proto
18
19 // Code generated by protoc-gen-go. DO NOT EDIT.
20 // versions:
21 // protoc-gen-go v1.36.10
22 // protoc v5.27.1
23 // source: grpc/binlog/v1/binarylog.proto
24
25 package grpc_binarylog_v1
26
27 import (
28 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30 durationpb "google.golang.org/protobuf/types/known/durationpb"
31 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
32 reflect "reflect"
33 sync "sync"
34 unsafe "unsafe"
35 )
36
37 const (
38 // Verify that this generated code is sufficiently up-to-date.
39 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
40 // Verify that runtime/protoimpl is sufficiently up-to-date.
41 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
42 )
43
44 // Enumerates the type of event
45 // Note the terminology is different from the RPC semantics
46 // definition, but the same meaning is expressed here.
47 type GrpcLogEntry_EventType int32
48
49 const (
50 GrpcLogEntry_EVENT_TYPE_UNKNOWN GrpcLogEntry_EventType = 0
51 // Header sent from client to server
52 GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER GrpcLogEntry_EventType = 1
53 // Header sent from server to client
54 GrpcLogEntry_EVENT_TYPE_SERVER_HEADER GrpcLogEntry_EventType = 2
55 // Message sent from client to server
56 GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE GrpcLogEntry_EventType = 3
57 // Message sent from server to client
58 GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE GrpcLogEntry_EventType = 4
59 // A signal that client is done sending
60 GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE GrpcLogEntry_EventType = 5
61 // Trailer indicates the end of the RPC.
62 // On client side, this event means a trailer was either received
63 // from the network or the gRPC library locally generated a status
64 // to inform the application about a failure.
65 // On server side, this event means the server application requested
66 // to send a trailer. Note: EVENT_TYPE_CANCEL may still arrive after
67 // this due to races on server side.
68 GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER GrpcLogEntry_EventType = 6
69 // A signal that the RPC is cancelled. On client side, this
70 // indicates the client application requests a cancellation.
71 // On server side, this indicates that cancellation was detected.
72 // Note: This marks the end of the RPC. Events may arrive after
73 // this due to races. For example, on client side a trailer
74 // may arrive even though the application requested to cancel the RPC.
75 GrpcLogEntry_EVENT_TYPE_CANCEL GrpcLogEntry_EventType = 7
76 )
77
78 // Enum value maps for GrpcLogEntry_EventType.
79 var (
80 GrpcLogEntry_EventType_name = map[int32]string{
81 0: "EVENT_TYPE_UNKNOWN",
82 1: "EVENT_TYPE_CLIENT_HEADER",
83 2: "EVENT_TYPE_SERVER_HEADER",
84 3: "EVENT_TYPE_CLIENT_MESSAGE",
85 4: "EVENT_TYPE_SERVER_MESSAGE",
86 5: "EVENT_TYPE_CLIENT_HALF_CLOSE",
87 6: "EVENT_TYPE_SERVER_TRAILER",
88 7: "EVENT_TYPE_CANCEL",
89 }
90 GrpcLogEntry_EventType_value = map[string]int32{
91 "EVENT_TYPE_UNKNOWN": 0,
92 "EVENT_TYPE_CLIENT_HEADER": 1,
93 "EVENT_TYPE_SERVER_HEADER": 2,
94 "EVENT_TYPE_CLIENT_MESSAGE": 3,
95 "EVENT_TYPE_SERVER_MESSAGE": 4,
96 "EVENT_TYPE_CLIENT_HALF_CLOSE": 5,
97 "EVENT_TYPE_SERVER_TRAILER": 6,
98 "EVENT_TYPE_CANCEL": 7,
99 }
100 )
101
102 func (x GrpcLogEntry_EventType) Enum() *GrpcLogEntry_EventType {
103 p := new(GrpcLogEntry_EventType)
104 *p = x
105 return p
106 }
107
108 func (x GrpcLogEntry_EventType) String() string {
109 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
110 }
111
112 func (GrpcLogEntry_EventType) Descriptor() protoreflect.EnumDescriptor {
113 return file_grpc_binlog_v1_binarylog_proto_enumTypes[0].Descriptor()
114 }
115
116 func (GrpcLogEntry_EventType) Type() protoreflect.EnumType {
117 return &file_grpc_binlog_v1_binarylog_proto_enumTypes[0]
118 }
119
120 func (x GrpcLogEntry_EventType) Number() protoreflect.EnumNumber {
121 return protoreflect.EnumNumber(x)
122 }
123
124 // Deprecated: Use GrpcLogEntry_EventType.Descriptor instead.
125 func (GrpcLogEntry_EventType) EnumDescriptor() ([]byte, []int) {
126 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0, 0}
127 }
128
129 // Enumerates the entity that generates the log entry
130 type GrpcLogEntry_Logger int32
131
132 const (
133 GrpcLogEntry_LOGGER_UNKNOWN GrpcLogEntry_Logger = 0
134 GrpcLogEntry_LOGGER_CLIENT GrpcLogEntry_Logger = 1
135 GrpcLogEntry_LOGGER_SERVER GrpcLogEntry_Logger = 2
136 )
137
138 // Enum value maps for GrpcLogEntry_Logger.
139 var (
140 GrpcLogEntry_Logger_name = map[int32]string{
141 0: "LOGGER_UNKNOWN",
142 1: "LOGGER_CLIENT",
143 2: "LOGGER_SERVER",
144 }
145 GrpcLogEntry_Logger_value = map[string]int32{
146 "LOGGER_UNKNOWN": 0,
147 "LOGGER_CLIENT": 1,
148 "LOGGER_SERVER": 2,
149 }
150 )
151
152 func (x GrpcLogEntry_Logger) Enum() *GrpcLogEntry_Logger {
153 p := new(GrpcLogEntry_Logger)
154 *p = x
155 return p
156 }
157
158 func (x GrpcLogEntry_Logger) String() string {
159 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
160 }
161
162 func (GrpcLogEntry_Logger) Descriptor() protoreflect.EnumDescriptor {
163 return file_grpc_binlog_v1_binarylog_proto_enumTypes[1].Descriptor()
164 }
165
166 func (GrpcLogEntry_Logger) Type() protoreflect.EnumType {
167 return &file_grpc_binlog_v1_binarylog_proto_enumTypes[1]
168 }
169
170 func (x GrpcLogEntry_Logger) Number() protoreflect.EnumNumber {
171 return protoreflect.EnumNumber(x)
172 }
173
174 // Deprecated: Use GrpcLogEntry_Logger.Descriptor instead.
175 func (GrpcLogEntry_Logger) EnumDescriptor() ([]byte, []int) {
176 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0, 1}
177 }
178
179 type Address_Type int32
180
181 const (
182 Address_TYPE_UNKNOWN Address_Type = 0
183 // address is in 1.2.3.4 form
184 Address_TYPE_IPV4 Address_Type = 1
185 // address is in IPv6 canonical form (RFC5952 section 4)
186 // The scope is NOT included in the address string.
187 Address_TYPE_IPV6 Address_Type = 2
188 // address is UDS string
189 Address_TYPE_UNIX Address_Type = 3
190 )
191
192 // Enum value maps for Address_Type.
193 var (
194 Address_Type_name = map[int32]string{
195 0: "TYPE_UNKNOWN",
196 1: "TYPE_IPV4",
197 2: "TYPE_IPV6",
198 3: "TYPE_UNIX",
199 }
200 Address_Type_value = map[string]int32{
201 "TYPE_UNKNOWN": 0,
202 "TYPE_IPV4": 1,
203 "TYPE_IPV6": 2,
204 "TYPE_UNIX": 3,
205 }
206 )
207
208 func (x Address_Type) Enum() *Address_Type {
209 p := new(Address_Type)
210 *p = x
211 return p
212 }
213
214 func (x Address_Type) String() string {
215 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
216 }
217
218 func (Address_Type) Descriptor() protoreflect.EnumDescriptor {
219 return file_grpc_binlog_v1_binarylog_proto_enumTypes[2].Descriptor()
220 }
221
222 func (Address_Type) Type() protoreflect.EnumType {
223 return &file_grpc_binlog_v1_binarylog_proto_enumTypes[2]
224 }
225
226 func (x Address_Type) Number() protoreflect.EnumNumber {
227 return protoreflect.EnumNumber(x)
228 }
229
230 // Deprecated: Use Address_Type.Descriptor instead.
231 func (Address_Type) EnumDescriptor() ([]byte, []int) {
232 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{7, 0}
233 }
234
235 // Log entry we store in binary logs
236 type GrpcLogEntry struct {
237 state protoimpl.MessageState `protogen:"open.v1"`
238 // The timestamp of the binary log message
239 Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
240 // Uniquely identifies a call. The value must not be 0 in order to disambiguate
241 // from an unset value.
242 // Each call may have several log entries, they will all have the same call_id.
243 // Nothing is guaranteed about their value other than they are unique across
244 // different RPCs in the same gRPC process.
245 CallId uint64 `protobuf:"varint,2,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"`
246 // The entry sequence id for this call. The first GrpcLogEntry has a
247 // value of 1, to disambiguate from an unset value. The purpose of
248 // this field is to detect missing entries in environments where
249 // durability or ordering is not guaranteed.
250 SequenceIdWithinCall uint64 `protobuf:"varint,3,opt,name=sequence_id_within_call,json=sequenceIdWithinCall,proto3" json:"sequence_id_within_call,omitempty"`
251 Type GrpcLogEntry_EventType `protobuf:"varint,4,opt,name=type,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_EventType" json:"type,omitempty"`
252 Logger GrpcLogEntry_Logger `protobuf:"varint,5,opt,name=logger,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_Logger" json:"logger,omitempty"` // One of the above Logger enum
253 // The logger uses one of the following fields to record the payload,
254 // according to the type of the log entry.
255 //
256 // Types that are valid to be assigned to Payload:
257 //
258 // *GrpcLogEntry_ClientHeader
259 // *GrpcLogEntry_ServerHeader
260 // *GrpcLogEntry_Message
261 // *GrpcLogEntry_Trailer
262 Payload isGrpcLogEntry_Payload `protobuf_oneof:"payload"`
263 // true if payload does not represent the full message or metadata.
264 PayloadTruncated bool `protobuf:"varint,10,opt,name=payload_truncated,json=payloadTruncated,proto3" json:"payload_truncated,omitempty"`
265 // Peer address information, will only be recorded on the first
266 // incoming event. On client side, peer is logged on
267 // EVENT_TYPE_SERVER_HEADER normally or EVENT_TYPE_SERVER_TRAILER in
268 // the case of trailers-only. On server side, peer is always
269 // logged on EVENT_TYPE_CLIENT_HEADER.
270 Peer *Address `protobuf:"bytes,11,opt,name=peer,proto3" json:"peer,omitempty"`
271 unknownFields protoimpl.UnknownFields
272 sizeCache protoimpl.SizeCache
273 }
274
275 func (x *GrpcLogEntry) Reset() {
276 *x = GrpcLogEntry{}
277 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]
278 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
279 ms.StoreMessageInfo(mi)
280 }
281
282 func (x *GrpcLogEntry) String() string {
283 return protoimpl.X.MessageStringOf(x)
284 }
285
286 func (*GrpcLogEntry) ProtoMessage() {}
287
288 func (x *GrpcLogEntry) ProtoReflect() protoreflect.Message {
289 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]
290 if x != nil {
291 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
292 if ms.LoadMessageInfo() == nil {
293 ms.StoreMessageInfo(mi)
294 }
295 return ms
296 }
297 return mi.MessageOf(x)
298 }
299
300 // Deprecated: Use GrpcLogEntry.ProtoReflect.Descriptor instead.
301 func (*GrpcLogEntry) Descriptor() ([]byte, []int) {
302 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0}
303 }
304
305 func (x *GrpcLogEntry) GetTimestamp() *timestamppb.Timestamp {
306 if x != nil {
307 return x.Timestamp
308 }
309 return nil
310 }
311
312 func (x *GrpcLogEntry) GetCallId() uint64 {
313 if x != nil {
314 return x.CallId
315 }
316 return 0
317 }
318
319 func (x *GrpcLogEntry) GetSequenceIdWithinCall() uint64 {
320 if x != nil {
321 return x.SequenceIdWithinCall
322 }
323 return 0
324 }
325
326 func (x *GrpcLogEntry) GetType() GrpcLogEntry_EventType {
327 if x != nil {
328 return x.Type
329 }
330 return GrpcLogEntry_EVENT_TYPE_UNKNOWN
331 }
332
333 func (x *GrpcLogEntry) GetLogger() GrpcLogEntry_Logger {
334 if x != nil {
335 return x.Logger
336 }
337 return GrpcLogEntry_LOGGER_UNKNOWN
338 }
339
340 func (x *GrpcLogEntry) GetPayload() isGrpcLogEntry_Payload {
341 if x != nil {
342 return x.Payload
343 }
344 return nil
345 }
346
347 func (x *GrpcLogEntry) GetClientHeader() *ClientHeader {
348 if x != nil {
349 if x, ok := x.Payload.(*GrpcLogEntry_ClientHeader); ok {
350 return x.ClientHeader
351 }
352 }
353 return nil
354 }
355
356 func (x *GrpcLogEntry) GetServerHeader() *ServerHeader {
357 if x != nil {
358 if x, ok := x.Payload.(*GrpcLogEntry_ServerHeader); ok {
359 return x.ServerHeader
360 }
361 }
362 return nil
363 }
364
365 func (x *GrpcLogEntry) GetMessage() *Message {
366 if x != nil {
367 if x, ok := x.Payload.(*GrpcLogEntry_Message); ok {
368 return x.Message
369 }
370 }
371 return nil
372 }
373
374 func (x *GrpcLogEntry) GetTrailer() *Trailer {
375 if x != nil {
376 if x, ok := x.Payload.(*GrpcLogEntry_Trailer); ok {
377 return x.Trailer
378 }
379 }
380 return nil
381 }
382
383 func (x *GrpcLogEntry) GetPayloadTruncated() bool {
384 if x != nil {
385 return x.PayloadTruncated
386 }
387 return false
388 }
389
390 func (x *GrpcLogEntry) GetPeer() *Address {
391 if x != nil {
392 return x.Peer
393 }
394 return nil
395 }
396
397 type isGrpcLogEntry_Payload interface {
398 isGrpcLogEntry_Payload()
399 }
400
401 type GrpcLogEntry_ClientHeader struct {
402 ClientHeader *ClientHeader `protobuf:"bytes,6,opt,name=client_header,json=clientHeader,proto3,oneof"`
403 }
404
405 type GrpcLogEntry_ServerHeader struct {
406 ServerHeader *ServerHeader `protobuf:"bytes,7,opt,name=server_header,json=serverHeader,proto3,oneof"`
407 }
408
409 type GrpcLogEntry_Message struct {
410 // Used by EVENT_TYPE_CLIENT_MESSAGE, EVENT_TYPE_SERVER_MESSAGE
411 Message *Message `protobuf:"bytes,8,opt,name=message,proto3,oneof"`
412 }
413
414 type GrpcLogEntry_Trailer struct {
415 Trailer *Trailer `protobuf:"bytes,9,opt,name=trailer,proto3,oneof"`
416 }
417
418 func (*GrpcLogEntry_ClientHeader) isGrpcLogEntry_Payload() {}
419
420 func (*GrpcLogEntry_ServerHeader) isGrpcLogEntry_Payload() {}
421
422 func (*GrpcLogEntry_Message) isGrpcLogEntry_Payload() {}
423
424 func (*GrpcLogEntry_Trailer) isGrpcLogEntry_Payload() {}
425
426 type ClientHeader struct {
427 state protoimpl.MessageState `protogen:"open.v1"`
428 // This contains only the metadata from the application.
429 Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
430 // The name of the RPC method, which looks something like:
431 // /<service>/<method>
432 // Note the leading "/" character.
433 MethodName string `protobuf:"bytes,2,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"`
434 // A single process may be used to run multiple virtual
435 // servers with different identities.
436 // The authority is the name of such a server identity.
437 // It is typically a portion of the URI in the form of
438 // <host> or <host>:<port> .
439 Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
440 // the RPC timeout
441 Timeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
442 unknownFields protoimpl.UnknownFields
443 sizeCache protoimpl.SizeCache
444 }
445
446 func (x *ClientHeader) Reset() {
447 *x = ClientHeader{}
448 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]
449 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
450 ms.StoreMessageInfo(mi)
451 }
452
453 func (x *ClientHeader) String() string {
454 return protoimpl.X.MessageStringOf(x)
455 }
456
457 func (*ClientHeader) ProtoMessage() {}
458
459 func (x *ClientHeader) ProtoReflect() protoreflect.Message {
460 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]
461 if x != nil {
462 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
463 if ms.LoadMessageInfo() == nil {
464 ms.StoreMessageInfo(mi)
465 }
466 return ms
467 }
468 return mi.MessageOf(x)
469 }
470
471 // Deprecated: Use ClientHeader.ProtoReflect.Descriptor instead.
472 func (*ClientHeader) Descriptor() ([]byte, []int) {
473 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{1}
474 }
475
476 func (x *ClientHeader) GetMetadata() *Metadata {
477 if x != nil {
478 return x.Metadata
479 }
480 return nil
481 }
482
483 func (x *ClientHeader) GetMethodName() string {
484 if x != nil {
485 return x.MethodName
486 }
487 return ""
488 }
489
490 func (x *ClientHeader) GetAuthority() string {
491 if x != nil {
492 return x.Authority
493 }
494 return ""
495 }
496
497 func (x *ClientHeader) GetTimeout() *durationpb.Duration {
498 if x != nil {
499 return x.Timeout
500 }
501 return nil
502 }
503
504 type ServerHeader struct {
505 state protoimpl.MessageState `protogen:"open.v1"`
506 // This contains only the metadata from the application.
507 Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
508 unknownFields protoimpl.UnknownFields
509 sizeCache protoimpl.SizeCache
510 }
511
512 func (x *ServerHeader) Reset() {
513 *x = ServerHeader{}
514 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]
515 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
516 ms.StoreMessageInfo(mi)
517 }
518
519 func (x *ServerHeader) String() string {
520 return protoimpl.X.MessageStringOf(x)
521 }
522
523 func (*ServerHeader) ProtoMessage() {}
524
525 func (x *ServerHeader) ProtoReflect() protoreflect.Message {
526 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]
527 if x != nil {
528 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
529 if ms.LoadMessageInfo() == nil {
530 ms.StoreMessageInfo(mi)
531 }
532 return ms
533 }
534 return mi.MessageOf(x)
535 }
536
537 // Deprecated: Use ServerHeader.ProtoReflect.Descriptor instead.
538 func (*ServerHeader) Descriptor() ([]byte, []int) {
539 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{2}
540 }
541
542 func (x *ServerHeader) GetMetadata() *Metadata {
543 if x != nil {
544 return x.Metadata
545 }
546 return nil
547 }
548
549 type Trailer struct {
550 state protoimpl.MessageState `protogen:"open.v1"`
551 // This contains only the metadata from the application.
552 Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
553 // The gRPC status code.
554 StatusCode uint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
555 // An original status message before any transport specific
556 // encoding.
557 StatusMessage string `protobuf:"bytes,3,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
558 // The value of the 'grpc-status-details-bin' metadata key. If
559 // present, this is always an encoded 'google.rpc.Status' message.
560 StatusDetails []byte `protobuf:"bytes,4,opt,name=status_details,json=statusDetails,proto3" json:"status_details,omitempty"`
561 unknownFields protoimpl.UnknownFields
562 sizeCache protoimpl.SizeCache
563 }
564
565 func (x *Trailer) Reset() {
566 *x = Trailer{}
567 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]
568 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
569 ms.StoreMessageInfo(mi)
570 }
571
572 func (x *Trailer) String() string {
573 return protoimpl.X.MessageStringOf(x)
574 }
575
576 func (*Trailer) ProtoMessage() {}
577
578 func (x *Trailer) ProtoReflect() protoreflect.Message {
579 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]
580 if x != nil {
581 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
582 if ms.LoadMessageInfo() == nil {
583 ms.StoreMessageInfo(mi)
584 }
585 return ms
586 }
587 return mi.MessageOf(x)
588 }
589
590 // Deprecated: Use Trailer.ProtoReflect.Descriptor instead.
591 func (*Trailer) Descriptor() ([]byte, []int) {
592 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{3}
593 }
594
595 func (x *Trailer) GetMetadata() *Metadata {
596 if x != nil {
597 return x.Metadata
598 }
599 return nil
600 }
601
602 func (x *Trailer) GetStatusCode() uint32 {
603 if x != nil {
604 return x.StatusCode
605 }
606 return 0
607 }
608
609 func (x *Trailer) GetStatusMessage() string {
610 if x != nil {
611 return x.StatusMessage
612 }
613 return ""
614 }
615
616 func (x *Trailer) GetStatusDetails() []byte {
617 if x != nil {
618 return x.StatusDetails
619 }
620 return nil
621 }
622
623 // Message payload, used by CLIENT_MESSAGE and SERVER_MESSAGE
624 type Message struct {
625 state protoimpl.MessageState `protogen:"open.v1"`
626 // Length of the message. It may not be the same as the length of the
627 // data field, as the logging payload can be truncated or omitted.
628 Length uint32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
629 // May be truncated or omitted.
630 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
631 unknownFields protoimpl.UnknownFields
632 sizeCache protoimpl.SizeCache
633 }
634
635 func (x *Message) Reset() {
636 *x = Message{}
637 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]
638 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
639 ms.StoreMessageInfo(mi)
640 }
641
642 func (x *Message) String() string {
643 return protoimpl.X.MessageStringOf(x)
644 }
645
646 func (*Message) ProtoMessage() {}
647
648 func (x *Message) ProtoReflect() protoreflect.Message {
649 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]
650 if x != nil {
651 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
652 if ms.LoadMessageInfo() == nil {
653 ms.StoreMessageInfo(mi)
654 }
655 return ms
656 }
657 return mi.MessageOf(x)
658 }
659
660 // Deprecated: Use Message.ProtoReflect.Descriptor instead.
661 func (*Message) Descriptor() ([]byte, []int) {
662 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{4}
663 }
664
665 func (x *Message) GetLength() uint32 {
666 if x != nil {
667 return x.Length
668 }
669 return 0
670 }
671
672 func (x *Message) GetData() []byte {
673 if x != nil {
674 return x.Data
675 }
676 return nil
677 }
678
679 // A list of metadata pairs, used in the payload of client header,
680 // server header, and server trailer.
681 // Implementations may omit some entries to honor the header limits
682 // of GRPC_BINARY_LOG_CONFIG.
683 //
684 // Header keys added by gRPC are omitted. To be more specific,
685 // implementations will not log the following entries, and this is
686 // not to be treated as a truncation:
687 // - entries handled by grpc that are not user visible, such as those
688 // that begin with 'grpc-' (with exception of grpc-trace-bin)
689 // or keys like 'lb-token'
690 // - transport specific entries, including but not limited to:
691 // ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
692 // - entries added for call credentials
693 //
694 // Implementations must always log grpc-trace-bin if it is present.
695 // Practically speaking it will only be visible on server side because
696 // grpc-trace-bin is managed by low level client side mechanisms
697 // inaccessible from the application level. On server side, the
698 // header is just a normal metadata key.
699 // The pair will not count towards the size limit.
700 type Metadata struct {
701 state protoimpl.MessageState `protogen:"open.v1"`
702 Entry []*MetadataEntry `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
703 unknownFields protoimpl.UnknownFields
704 sizeCache protoimpl.SizeCache
705 }
706
707 func (x *Metadata) Reset() {
708 *x = Metadata{}
709 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]
710 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
711 ms.StoreMessageInfo(mi)
712 }
713
714 func (x *Metadata) String() string {
715 return protoimpl.X.MessageStringOf(x)
716 }
717
718 func (*Metadata) ProtoMessage() {}
719
720 func (x *Metadata) ProtoReflect() protoreflect.Message {
721 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]
722 if x != nil {
723 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
724 if ms.LoadMessageInfo() == nil {
725 ms.StoreMessageInfo(mi)
726 }
727 return ms
728 }
729 return mi.MessageOf(x)
730 }
731
732 // Deprecated: Use Metadata.ProtoReflect.Descriptor instead.
733 func (*Metadata) Descriptor() ([]byte, []int) {
734 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{5}
735 }
736
737 func (x *Metadata) GetEntry() []*MetadataEntry {
738 if x != nil {
739 return x.Entry
740 }
741 return nil
742 }
743
744 // A metadata key value pair
745 type MetadataEntry struct {
746 state protoimpl.MessageState `protogen:"open.v1"`
747 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
748 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
749 unknownFields protoimpl.UnknownFields
750 sizeCache protoimpl.SizeCache
751 }
752
753 func (x *MetadataEntry) Reset() {
754 *x = MetadataEntry{}
755 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]
756 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
757 ms.StoreMessageInfo(mi)
758 }
759
760 func (x *MetadataEntry) String() string {
761 return protoimpl.X.MessageStringOf(x)
762 }
763
764 func (*MetadataEntry) ProtoMessage() {}
765
766 func (x *MetadataEntry) ProtoReflect() protoreflect.Message {
767 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]
768 if x != nil {
769 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
770 if ms.LoadMessageInfo() == nil {
771 ms.StoreMessageInfo(mi)
772 }
773 return ms
774 }
775 return mi.MessageOf(x)
776 }
777
778 // Deprecated: Use MetadataEntry.ProtoReflect.Descriptor instead.
779 func (*MetadataEntry) Descriptor() ([]byte, []int) {
780 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{6}
781 }
782
783 func (x *MetadataEntry) GetKey() string {
784 if x != nil {
785 return x.Key
786 }
787 return ""
788 }
789
790 func (x *MetadataEntry) GetValue() []byte {
791 if x != nil {
792 return x.Value
793 }
794 return nil
795 }
796
797 // Address information
798 type Address struct {
799 state protoimpl.MessageState `protogen:"open.v1"`
800 Type Address_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.binarylog.v1.Address_Type" json:"type,omitempty"`
801 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
802 // only for TYPE_IPV4 and TYPE_IPV6
803 IpPort uint32 `protobuf:"varint,3,opt,name=ip_port,json=ipPort,proto3" json:"ip_port,omitempty"`
804 unknownFields protoimpl.UnknownFields
805 sizeCache protoimpl.SizeCache
806 }
807
808 func (x *Address) Reset() {
809 *x = Address{}
810 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]
811 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
812 ms.StoreMessageInfo(mi)
813 }
814
815 func (x *Address) String() string {
816 return protoimpl.X.MessageStringOf(x)
817 }
818
819 func (*Address) ProtoMessage() {}
820
821 func (x *Address) ProtoReflect() protoreflect.Message {
822 mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]
823 if x != nil {
824 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
825 if ms.LoadMessageInfo() == nil {
826 ms.StoreMessageInfo(mi)
827 }
828 return ms
829 }
830 return mi.MessageOf(x)
831 }
832
833 // Deprecated: Use Address.ProtoReflect.Descriptor instead.
834 func (*Address) Descriptor() ([]byte, []int) {
835 return file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{7}
836 }
837
838 func (x *Address) GetType() Address_Type {
839 if x != nil {
840 return x.Type
841 }
842 return Address_TYPE_UNKNOWN
843 }
844
845 func (x *Address) GetAddress() string {
846 if x != nil {
847 return x.Address
848 }
849 return ""
850 }
851
852 func (x *Address) GetIpPort() uint32 {
853 if x != nil {
854 return x.IpPort
855 }
856 return 0
857 }
858
859 var File_grpc_binlog_v1_binarylog_proto protoreflect.FileDescriptor
860
861 const file_grpc_binlog_v1_binarylog_proto_rawDesc = "" +
862 "\n" +
863 "\x1egrpc/binlog/v1/binarylog.proto\x12\x11grpc.binarylog.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\a\n" +
864 "\fGrpcLogEntry\x128\n" +
865 "\ttimestamp\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12\x17\n" +
866 "\acall_id\x18\x02 \x01(\x04R\x06callId\x125\n" +
867 "\x17sequence_id_within_call\x18\x03 \x01(\x04R\x14sequenceIdWithinCall\x12=\n" +
868 "\x04type\x18\x04 \x01(\x0e2).grpc.binarylog.v1.GrpcLogEntry.EventTypeR\x04type\x12>\n" +
869 "\x06logger\x18\x05 \x01(\x0e2&.grpc.binarylog.v1.GrpcLogEntry.LoggerR\x06logger\x12F\n" +
870 "\rclient_header\x18\x06 \x01(\v2\x1f.grpc.binarylog.v1.ClientHeaderH\x00R\fclientHeader\x12F\n" +
871 "\rserver_header\x18\a \x01(\v2\x1f.grpc.binarylog.v1.ServerHeaderH\x00R\fserverHeader\x126\n" +
872 "\amessage\x18\b \x01(\v2\x1a.grpc.binarylog.v1.MessageH\x00R\amessage\x126\n" +
873 "\atrailer\x18\t \x01(\v2\x1a.grpc.binarylog.v1.TrailerH\x00R\atrailer\x12+\n" +
874 "\x11payload_truncated\x18\n" +
875 " \x01(\bR\x10payloadTruncated\x12.\n" +
876 "\x04peer\x18\v \x01(\v2\x1a.grpc.binarylog.v1.AddressR\x04peer\"\xf5\x01\n" +
877 "\tEventType\x12\x16\n" +
878 "\x12EVENT_TYPE_UNKNOWN\x10\x00\x12\x1c\n" +
879 "\x18EVENT_TYPE_CLIENT_HEADER\x10\x01\x12\x1c\n" +
880 "\x18EVENT_TYPE_SERVER_HEADER\x10\x02\x12\x1d\n" +
881 "\x19EVENT_TYPE_CLIENT_MESSAGE\x10\x03\x12\x1d\n" +
882 "\x19EVENT_TYPE_SERVER_MESSAGE\x10\x04\x12 \n" +
883 "\x1cEVENT_TYPE_CLIENT_HALF_CLOSE\x10\x05\x12\x1d\n" +
884 "\x19EVENT_TYPE_SERVER_TRAILER\x10\x06\x12\x15\n" +
885 "\x11EVENT_TYPE_CANCEL\x10\a\"B\n" +
886 "\x06Logger\x12\x12\n" +
887 "\x0eLOGGER_UNKNOWN\x10\x00\x12\x11\n" +
888 "\rLOGGER_CLIENT\x10\x01\x12\x11\n" +
889 "\rLOGGER_SERVER\x10\x02B\t\n" +
890 "\apayload\"\xbb\x01\n" +
891 "\fClientHeader\x127\n" +
892 "\bmetadata\x18\x01 \x01(\v2\x1b.grpc.binarylog.v1.MetadataR\bmetadata\x12\x1f\n" +
893 "\vmethod_name\x18\x02 \x01(\tR\n" +
894 "methodName\x12\x1c\n" +
895 "\tauthority\x18\x03 \x01(\tR\tauthority\x123\n" +
896 "\atimeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\atimeout\"G\n" +
897 "\fServerHeader\x127\n" +
898 "\bmetadata\x18\x01 \x01(\v2\x1b.grpc.binarylog.v1.MetadataR\bmetadata\"\xb1\x01\n" +
899 "\aTrailer\x127\n" +
900 "\bmetadata\x18\x01 \x01(\v2\x1b.grpc.binarylog.v1.MetadataR\bmetadata\x12\x1f\n" +
901 "\vstatus_code\x18\x02 \x01(\rR\n" +
902 "statusCode\x12%\n" +
903 "\x0estatus_message\x18\x03 \x01(\tR\rstatusMessage\x12%\n" +
904 "\x0estatus_details\x18\x04 \x01(\fR\rstatusDetails\"5\n" +
905 "\aMessage\x12\x16\n" +
906 "\x06length\x18\x01 \x01(\rR\x06length\x12\x12\n" +
907 "\x04data\x18\x02 \x01(\fR\x04data\"B\n" +
908 "\bMetadata\x126\n" +
909 "\x05entry\x18\x01 \x03(\v2 .grpc.binarylog.v1.MetadataEntryR\x05entry\"7\n" +
910 "\rMetadataEntry\x12\x10\n" +
911 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
912 "\x05value\x18\x02 \x01(\fR\x05value\"\xb8\x01\n" +
913 "\aAddress\x123\n" +
914 "\x04type\x18\x01 \x01(\x0e2\x1f.grpc.binarylog.v1.Address.TypeR\x04type\x12\x18\n" +
915 "\aaddress\x18\x02 \x01(\tR\aaddress\x12\x17\n" +
916 "\aip_port\x18\x03 \x01(\rR\x06ipPort\"E\n" +
917 "\x04Type\x12\x10\n" +
918 "\fTYPE_UNKNOWN\x10\x00\x12\r\n" +
919 "\tTYPE_IPV4\x10\x01\x12\r\n" +
920 "\tTYPE_IPV6\x10\x02\x12\r\n" +
921 "\tTYPE_UNIX\x10\x03B\\\n" +
922 "\x14io.grpc.binarylog.v1B\x0eBinaryLogProtoP\x01Z2google.golang.org/grpc/binarylog/grpc_binarylog_v1b\x06proto3"
923
924 var (
925 file_grpc_binlog_v1_binarylog_proto_rawDescOnce sync.Once
926 file_grpc_binlog_v1_binarylog_proto_rawDescData []byte
927 )
928
929 func file_grpc_binlog_v1_binarylog_proto_rawDescGZIP() []byte {
930 file_grpc_binlog_v1_binarylog_proto_rawDescOnce.Do(func() {
931 file_grpc_binlog_v1_binarylog_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_binlog_v1_binarylog_proto_rawDesc), len(file_grpc_binlog_v1_binarylog_proto_rawDesc)))
932 })
933 return file_grpc_binlog_v1_binarylog_proto_rawDescData
934 }
935
936 var file_grpc_binlog_v1_binarylog_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
937 var file_grpc_binlog_v1_binarylog_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
938 var file_grpc_binlog_v1_binarylog_proto_goTypes = []any{
939 (GrpcLogEntry_EventType)(0), // 0: grpc.binarylog.v1.GrpcLogEntry.EventType
940 (GrpcLogEntry_Logger)(0), // 1: grpc.binarylog.v1.GrpcLogEntry.Logger
941 (Address_Type)(0), // 2: grpc.binarylog.v1.Address.Type
942 (*GrpcLogEntry)(nil), // 3: grpc.binarylog.v1.GrpcLogEntry
943 (*ClientHeader)(nil), // 4: grpc.binarylog.v1.ClientHeader
944 (*ServerHeader)(nil), // 5: grpc.binarylog.v1.ServerHeader
945 (*Trailer)(nil), // 6: grpc.binarylog.v1.Trailer
946 (*Message)(nil), // 7: grpc.binarylog.v1.Message
947 (*Metadata)(nil), // 8: grpc.binarylog.v1.Metadata
948 (*MetadataEntry)(nil), // 9: grpc.binarylog.v1.MetadataEntry
949 (*Address)(nil), // 10: grpc.binarylog.v1.Address
950 (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
951 (*durationpb.Duration)(nil), // 12: google.protobuf.Duration
952 }
953 var file_grpc_binlog_v1_binarylog_proto_depIdxs = []int32{
954 11, // 0: grpc.binarylog.v1.GrpcLogEntry.timestamp:type_name -> google.protobuf.Timestamp
955 0, // 1: grpc.binarylog.v1.GrpcLogEntry.type:type_name -> grpc.binarylog.v1.GrpcLogEntry.EventType
956 1, // 2: grpc.binarylog.v1.GrpcLogEntry.logger:type_name -> grpc.binarylog.v1.GrpcLogEntry.Logger
957 4, // 3: grpc.binarylog.v1.GrpcLogEntry.client_header:type_name -> grpc.binarylog.v1.ClientHeader
958 5, // 4: grpc.binarylog.v1.GrpcLogEntry.server_header:type_name -> grpc.binarylog.v1.ServerHeader
959 7, // 5: grpc.binarylog.v1.GrpcLogEntry.message:type_name -> grpc.binarylog.v1.Message
960 6, // 6: grpc.binarylog.v1.GrpcLogEntry.trailer:type_name -> grpc.binarylog.v1.Trailer
961 10, // 7: grpc.binarylog.v1.GrpcLogEntry.peer:type_name -> grpc.binarylog.v1.Address
962 8, // 8: grpc.binarylog.v1.ClientHeader.metadata:type_name -> grpc.binarylog.v1.Metadata
963 12, // 9: grpc.binarylog.v1.ClientHeader.timeout:type_name -> google.protobuf.Duration
964 8, // 10: grpc.binarylog.v1.ServerHeader.metadata:type_name -> grpc.binarylog.v1.Metadata
965 8, // 11: grpc.binarylog.v1.Trailer.metadata:type_name -> grpc.binarylog.v1.Metadata
966 9, // 12: grpc.binarylog.v1.Metadata.entry:type_name -> grpc.binarylog.v1.MetadataEntry
967 2, // 13: grpc.binarylog.v1.Address.type:type_name -> grpc.binarylog.v1.Address.Type
968 14, // [14:14] is the sub-list for method output_type
969 14, // [14:14] is the sub-list for method input_type
970 14, // [14:14] is the sub-list for extension type_name
971 14, // [14:14] is the sub-list for extension extendee
972 0, // [0:14] is the sub-list for field type_name
973 }
974
975 func init() { file_grpc_binlog_v1_binarylog_proto_init() }
976 func file_grpc_binlog_v1_binarylog_proto_init() {
977 if File_grpc_binlog_v1_binarylog_proto != nil {
978 return
979 }
980 file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []any{
981 (*GrpcLogEntry_ClientHeader)(nil),
982 (*GrpcLogEntry_ServerHeader)(nil),
983 (*GrpcLogEntry_Message)(nil),
984 (*GrpcLogEntry_Trailer)(nil),
985 }
986 type x struct{}
987 out := protoimpl.TypeBuilder{
988 File: protoimpl.DescBuilder{
989 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
990 RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_binlog_v1_binarylog_proto_rawDesc), len(file_grpc_binlog_v1_binarylog_proto_rawDesc)),
991 NumEnums: 3,
992 NumMessages: 8,
993 NumExtensions: 0,
994 NumServices: 0,
995 },
996 GoTypes: file_grpc_binlog_v1_binarylog_proto_goTypes,
997 DependencyIndexes: file_grpc_binlog_v1_binarylog_proto_depIdxs,
998 EnumInfos: file_grpc_binlog_v1_binarylog_proto_enumTypes,
999 MessageInfos: file_grpc_binlog_v1_binarylog_proto_msgTypes,
1000 }.Build()
1001 File_grpc_binlog_v1_binarylog_proto = out.File
1002 file_grpc_binlog_v1_binarylog_proto_goTypes = nil
1003 file_grpc_binlog_v1_binarylog_proto_depIdxs = nil
1004 }
1005