Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- func (x *Address) GetAddress() string
- func (x *Address) GetIpPort() uint32
- func (x *Address) GetType() Address_Type
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) SetAddress(v string)
- func (x *Address) SetIpPort(v uint32)
- func (x *Address) SetType(v Address_Type)
- func (x *Address) String() string
- type Address_Type
- type Address_builder
- type ClientHeader
- func (x *ClientHeader) ClearMetadata()
- func (x *ClientHeader) ClearTimeout()
- func (x *ClientHeader) GetAuthority() string
- func (x *ClientHeader) GetMetadata() *Metadata
- func (x *ClientHeader) GetMethodName() string
- func (x *ClientHeader) GetTimeout() *durationpb.Duration
- func (x *ClientHeader) HasMetadata() bool
- func (x *ClientHeader) HasTimeout() bool
- func (*ClientHeader) ProtoMessage()
- func (x *ClientHeader) ProtoReflect() protoreflect.Message
- func (x *ClientHeader) Reset()
- func (x *ClientHeader) SetAuthority(v string)
- func (x *ClientHeader) SetMetadata(v *Metadata)
- func (x *ClientHeader) SetMethodName(v string)
- func (x *ClientHeader) SetTimeout(v *durationpb.Duration)
- func (x *ClientHeader) String() string
- type ClientHeader_builder
- type GrpcLogEntry
- func (x *GrpcLogEntry) ClearClientHeader()
- func (x *GrpcLogEntry) ClearMessage()
- func (x *GrpcLogEntry) ClearPayload()
- func (x *GrpcLogEntry) ClearPeer()
- func (x *GrpcLogEntry) ClearServerHeader()
- func (x *GrpcLogEntry) ClearTimestamp()
- func (x *GrpcLogEntry) ClearTrailer()
- func (x *GrpcLogEntry) GetCallId() uint64
- func (x *GrpcLogEntry) GetClientHeader() *ClientHeader
- func (x *GrpcLogEntry) GetLogger() GrpcLogEntry_Logger
- func (x *GrpcLogEntry) GetMessage() *Message
- func (x *GrpcLogEntry) GetPayload() isGrpcLogEntry_Payload
- func (x *GrpcLogEntry) GetPayloadTruncated() bool
- func (x *GrpcLogEntry) GetPeer() *Address
- func (x *GrpcLogEntry) GetSequenceIdWithinCall() uint64
- func (x *GrpcLogEntry) GetServerHeader() *ServerHeader
- func (x *GrpcLogEntry) GetTimestamp() *timestamppb.Timestamp
- func (x *GrpcLogEntry) GetTrailer() *Trailer
- func (x *GrpcLogEntry) GetType() GrpcLogEntry_EventType
- func (x *GrpcLogEntry) HasClientHeader() bool
- func (x *GrpcLogEntry) HasMessage() bool
- func (x *GrpcLogEntry) HasPayload() bool
- func (x *GrpcLogEntry) HasPeer() bool
- func (x *GrpcLogEntry) HasServerHeader() bool
- func (x *GrpcLogEntry) HasTimestamp() bool
- func (x *GrpcLogEntry) HasTrailer() bool
- func (*GrpcLogEntry) ProtoMessage()
- func (x *GrpcLogEntry) ProtoReflect() protoreflect.Message
- func (x *GrpcLogEntry) Reset()
- func (x *GrpcLogEntry) SetCallId(v uint64)
- func (x *GrpcLogEntry) SetClientHeader(v *ClientHeader)
- func (x *GrpcLogEntry) SetLogger(v GrpcLogEntry_Logger)
- func (x *GrpcLogEntry) SetMessage(v *Message)
- func (x *GrpcLogEntry) SetPayloadTruncated(v bool)
- func (x *GrpcLogEntry) SetPeer(v *Address)
- func (x *GrpcLogEntry) SetSequenceIdWithinCall(v uint64)
- func (x *GrpcLogEntry) SetServerHeader(v *ServerHeader)
- func (x *GrpcLogEntry) SetTimestamp(v *timestamppb.Timestamp)
- func (x *GrpcLogEntry) SetTrailer(v *Trailer)
- func (x *GrpcLogEntry) SetType(v GrpcLogEntry_EventType)
- func (x *GrpcLogEntry) String() string
- func (x *GrpcLogEntry) WhichPayload() case_GrpcLogEntry_Payload
- type GrpcLogEntry_ClientHeader
- type GrpcLogEntry_EventType
- func (GrpcLogEntry_EventType) Descriptor() protoreflect.EnumDescriptor
- func (x GrpcLogEntry_EventType) Enum() *GrpcLogEntry_EventType
- func (x GrpcLogEntry_EventType) Number() protoreflect.EnumNumber
- func (x GrpcLogEntry_EventType) String() string
- func (GrpcLogEntry_EventType) Type() protoreflect.EnumType
- type GrpcLogEntry_Logger
- type GrpcLogEntry_Message
- type GrpcLogEntry_ServerHeader
- type GrpcLogEntry_Trailer
- type GrpcLogEntry_builder
- type Message
- type Message_builder
- type Metadata
- type MetadataEntry
- func (x *MetadataEntry) GetKey() string
- func (x *MetadataEntry) GetValue() []byte
- func (*MetadataEntry) ProtoMessage()
- func (x *MetadataEntry) ProtoReflect() protoreflect.Message
- func (x *MetadataEntry) Reset()
- func (x *MetadataEntry) SetKey(v string)
- func (x *MetadataEntry) SetValue(v []byte)
- func (x *MetadataEntry) String() string
- type MetadataEntry_builder
- type Metadata_builder
- type ServerHeader
- func (x *ServerHeader) ClearMetadata()
- func (x *ServerHeader) GetMetadata() *Metadata
- func (x *ServerHeader) HasMetadata() bool
- func (*ServerHeader) ProtoMessage()
- func (x *ServerHeader) ProtoReflect() protoreflect.Message
- func (x *ServerHeader) Reset()
- func (x *ServerHeader) SetMetadata(v *Metadata)
- func (x *ServerHeader) String() string
- type ServerHeader_builder
- type Trailer
- func (x *Trailer) ClearMetadata()
- func (x *Trailer) GetMetadata() *Metadata
- func (x *Trailer) GetStatusCode() uint32
- func (x *Trailer) GetStatusDetails() []byte
- func (x *Trailer) GetStatusMessage() string
- func (x *Trailer) HasMetadata() bool
- func (*Trailer) ProtoMessage()
- func (x *Trailer) ProtoReflect() protoreflect.Message
- func (x *Trailer) Reset()
- func (x *Trailer) SetMetadata(v *Metadata)
- func (x *Trailer) SetStatusCode(v uint32)
- func (x *Trailer) SetStatusDetails(v []byte)
- func (x *Trailer) SetStatusMessage(v string)
- func (x *Trailer) String() string
- type Trailer_builder
Constants ¶
const GrpcLogEntry_ClientHeader_case case_GrpcLogEntry_Payload = 6
const GrpcLogEntry_Message_case case_GrpcLogEntry_Payload = 8
const GrpcLogEntry_Payload_not_set_case case_GrpcLogEntry_Payload = 0
const GrpcLogEntry_ServerHeader_case case_GrpcLogEntry_Payload = 7
const GrpcLogEntry_Trailer_case case_GrpcLogEntry_Payload = 9
Variables ¶
var ( GrpcLogEntry_EventType_name = map[int32]string{ 0: "EVENT_TYPE_UNKNOWN", 1: "EVENT_TYPE_CLIENT_HEADER", 2: "EVENT_TYPE_SERVER_HEADER", 3: "EVENT_TYPE_CLIENT_MESSAGE", 4: "EVENT_TYPE_SERVER_MESSAGE", 5: "EVENT_TYPE_CLIENT_HALF_CLOSE", 6: "EVENT_TYPE_SERVER_TRAILER", 7: "EVENT_TYPE_CANCEL", } GrpcLogEntry_EventType_value = map[string]int32{ "EVENT_TYPE_UNKNOWN": 0, "EVENT_TYPE_CLIENT_HEADER": 1, "EVENT_TYPE_SERVER_HEADER": 2, "EVENT_TYPE_CLIENT_MESSAGE": 3, "EVENT_TYPE_SERVER_MESSAGE": 4, "EVENT_TYPE_CLIENT_HALF_CLOSE": 5, "EVENT_TYPE_SERVER_TRAILER": 6, "EVENT_TYPE_CANCEL": 7, } )
Enum value maps for GrpcLogEntry_EventType.
var ( GrpcLogEntry_Logger_name = map[int32]string{ 0: "LOGGER_UNKNOWN", 1: "LOGGER_CLIENT", 2: "LOGGER_SERVER", } GrpcLogEntry_Logger_value = map[string]int32{ "LOGGER_UNKNOWN": 0, "LOGGER_CLIENT": 1, "LOGGER_SERVER": 2, } )
Enum value maps for GrpcLogEntry_Logger.
var ( Address_Type_name = map[int32]string{ 0: "TYPE_UNKNOWN", 1: "TYPE_IPV4", 2: "TYPE_IPV6", 3: "TYPE_UNIX", } Address_Type_value = map[string]int32{ "TYPE_UNKNOWN": 0, "TYPE_IPV4": 1, "TYPE_IPV6": 2, "TYPE_UNIX": 3, } )
Enum value maps for Address_Type.
var File_grpc_binlog_v1_binarylog_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Type Address_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.binarylog.v1.Address_Type" json:"type,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// only for TYPE_IPV4 and TYPE_IPV6
IpPort uint32 `protobuf:"varint,3,opt,name=ip_port,json=ipPort,proto3" json:"ip_port,omitempty"`
// contains filtered or unexported fields
}
Address information
func (*Address) GetType ¶
func (x *Address) GetType() Address_Type
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
func (*Address) SetType ¶
func (x *Address) SetType(v Address_Type)
type Address_Type ¶
type Address_Type int32
const ( Address_TYPE_UNKNOWN Address_Type = 0 // address is in 1.2.3.4 form Address_TYPE_IPV4 Address_Type = 1 // address is in IPv6 canonical form (RFC5952 section 4) // The scope is NOT included in the address string. Address_TYPE_IPV6 Address_Type = 2 // address is UDS string Address_TYPE_UNIX Address_Type = 3 )
func (Address_Type) Descriptor ¶
func (Address_Type) Descriptor() protoreflect.EnumDescriptor
func (Address_Type) Enum ¶
func (x Address_Type) Enum() *Address_Type
func (Address_Type) Number ¶
func (x Address_Type) Number() protoreflect.EnumNumber
func (Address_Type) String ¶
func (x Address_Type) String() string
func (Address_Type) Type ¶
func (Address_Type) Type() protoreflect.EnumType
type Address_builder ¶
type Address_builder struct {
Type Address_Type
Address string
// only for TYPE_IPV4 and TYPE_IPV6
IpPort uint32
// contains filtered or unexported fields
}
func (Address_builder) Build ¶
func (b0 Address_builder) Build() *Address
type ClientHeader ¶
type ClientHeader struct {
// This contains only the metadata from the application.
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// The name of the RPC method, which looks something like:
// /<service>/<method>
// Note the leading "/" character.
MethodName string `protobuf:"bytes,2,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"`
// A single process may be used to run multiple virtual
// servers with different identities.
// The authority is the name of such a server identity.
// It is typically a portion of the URI in the form of
// <host> or <host>:<port> .
Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
// the RPC timeout
Timeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
// contains filtered or unexported fields
}
func (*ClientHeader) ClearMetadata ¶
func (x *ClientHeader) ClearMetadata()
func (*ClientHeader) ClearTimeout ¶
func (x *ClientHeader) ClearTimeout()
func (*ClientHeader) GetAuthority ¶
func (x *ClientHeader) GetAuthority() string
func (*ClientHeader) GetMetadata ¶
func (x *ClientHeader) GetMetadata() *Metadata
func (*ClientHeader) GetMethodName ¶
func (x *ClientHeader) GetMethodName() string
func (*ClientHeader) GetTimeout ¶
func (x *ClientHeader) GetTimeout() *durationpb.Duration
func (*ClientHeader) HasMetadata ¶
func (x *ClientHeader) HasMetadata() bool
func (*ClientHeader) HasTimeout ¶
func (x *ClientHeader) HasTimeout() bool
func (*ClientHeader) ProtoMessage ¶
func (*ClientHeader) ProtoMessage()
func (*ClientHeader) ProtoReflect ¶
func (x *ClientHeader) ProtoReflect() protoreflect.Message
func (*ClientHeader) Reset ¶
func (x *ClientHeader) Reset()
func (*ClientHeader) SetAuthority ¶
func (x *ClientHeader) SetAuthority(v string)
func (*ClientHeader) SetMetadata ¶
func (x *ClientHeader) SetMetadata(v *Metadata)
func (*ClientHeader) SetMethodName ¶
func (x *ClientHeader) SetMethodName(v string)
func (*ClientHeader) SetTimeout ¶
func (x *ClientHeader) SetTimeout(v *durationpb.Duration)
func (*ClientHeader) String ¶
func (x *ClientHeader) String() string
type ClientHeader_builder ¶
type ClientHeader_builder struct {
// This contains only the metadata from the application.
Metadata *Metadata
// The name of the RPC method, which looks something like:
// /<service>/<method>
// Note the leading "/" character.
MethodName string
// A single process may be used to run multiple virtual
// servers with different identities.
// The authority is the name of such a server identity.
// It is typically a portion of the URI in the form of
// <host> or <host>:<port> .
Authority string
// the RPC timeout
Timeout *durationpb.Duration
// contains filtered or unexported fields
}
func (ClientHeader_builder) Build ¶
func (b0 ClientHeader_builder) Build() *ClientHeader
type GrpcLogEntry ¶
type GrpcLogEntry struct {
// The timestamp of the binary log message
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Uniquely identifies a call. The value must not be 0 in order to disambiguate
// from an unset value.
// Each call may have several log entries, they will all have the same call_id.
// Nothing is guaranteed about their value other than they are unique across
// different RPCs in the same gRPC process.
CallId uint64 `protobuf:"varint,2,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"`
// The entry sequence id for this call. The first GrpcLogEntry has a
// value of 1, to disambiguate from an unset value. The purpose of
// this field is to detect missing entries in environments where
// durability or ordering is not guaranteed.
SequenceIdWithinCall uint64 `` /* 126-byte string literal not displayed */
Type GrpcLogEntry_EventType `protobuf:"varint,4,opt,name=type,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_EventType" json:"type,omitempty"`
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
// The logger uses one of the following fields to record the payload,
// according to the type of the log entry.
//
// Types that are valid to be assigned to Payload:
//
// *GrpcLogEntry_ClientHeader
// *GrpcLogEntry_ServerHeader
// *GrpcLogEntry_Message
// *GrpcLogEntry_Trailer
Payload isGrpcLogEntry_Payload `protobuf_oneof:"payload"`
// true if payload does not represent the full message or metadata.
PayloadTruncated bool `protobuf:"varint,10,opt,name=payload_truncated,json=payloadTruncated,proto3" json:"payload_truncated,omitempty"`
// Peer address information, will only be recorded on the first
// incoming event. On client side, peer is logged on
// EVENT_TYPE_SERVER_HEADER normally or EVENT_TYPE_SERVER_TRAILER in
// the case of trailers-only. On server side, peer is always
// logged on EVENT_TYPE_CLIENT_HEADER.
Peer *Address `protobuf:"bytes,11,opt,name=peer,proto3" json:"peer,omitempty"`
// contains filtered or unexported fields
}
Log entry we store in binary logs
func (*GrpcLogEntry) ClearClientHeader ¶
func (x *GrpcLogEntry) ClearClientHeader()
func (*GrpcLogEntry) ClearMessage ¶
func (x *GrpcLogEntry) ClearMessage()
func (*GrpcLogEntry) ClearPayload ¶
func (x *GrpcLogEntry) ClearPayload()
func (*GrpcLogEntry) ClearPeer ¶
func (x *GrpcLogEntry) ClearPeer()
func (*GrpcLogEntry) ClearServerHeader ¶
func (x *GrpcLogEntry) ClearServerHeader()
func (*GrpcLogEntry) ClearTimestamp ¶
func (x *GrpcLogEntry) ClearTimestamp()
func (*GrpcLogEntry) ClearTrailer ¶
func (x *GrpcLogEntry) ClearTrailer()
func (*GrpcLogEntry) GetCallId ¶
func (x *GrpcLogEntry) GetCallId() uint64
func (*GrpcLogEntry) GetClientHeader ¶
func (x *GrpcLogEntry) GetClientHeader() *ClientHeader
func (*GrpcLogEntry) GetLogger ¶
func (x *GrpcLogEntry) GetLogger() GrpcLogEntry_Logger
func (*GrpcLogEntry) GetMessage ¶
func (x *GrpcLogEntry) GetMessage() *Message
func (*GrpcLogEntry) GetPayload ¶
func (x *GrpcLogEntry) GetPayload() isGrpcLogEntry_Payload
func (*GrpcLogEntry) GetPayloadTruncated ¶
func (x *GrpcLogEntry) GetPayloadTruncated() bool
func (*GrpcLogEntry) GetPeer ¶
func (x *GrpcLogEntry) GetPeer() *Address
func (*GrpcLogEntry) GetSequenceIdWithinCall ¶
func (x *GrpcLogEntry) GetSequenceIdWithinCall() uint64
func (*GrpcLogEntry) GetServerHeader ¶
func (x *GrpcLogEntry) GetServerHeader() *ServerHeader
func (*GrpcLogEntry) GetTimestamp ¶
func (x *GrpcLogEntry) GetTimestamp() *timestamppb.Timestamp
func (*GrpcLogEntry) GetTrailer ¶
func (x *GrpcLogEntry) GetTrailer() *Trailer
func (*GrpcLogEntry) GetType ¶
func (x *GrpcLogEntry) GetType() GrpcLogEntry_EventType
func (*GrpcLogEntry) HasClientHeader ¶
func (x *GrpcLogEntry) HasClientHeader() bool
func (*GrpcLogEntry) HasMessage ¶
func (x *GrpcLogEntry) HasMessage() bool
func (*GrpcLogEntry) HasPayload ¶
func (x *GrpcLogEntry) HasPayload() bool
func (*GrpcLogEntry) HasPeer ¶
func (x *GrpcLogEntry) HasPeer() bool
func (*GrpcLogEntry) HasServerHeader ¶
func (x *GrpcLogEntry) HasServerHeader() bool
func (*GrpcLogEntry) HasTimestamp ¶
func (x *GrpcLogEntry) HasTimestamp() bool
func (*GrpcLogEntry) HasTrailer ¶
func (x *GrpcLogEntry) HasTrailer() bool
func (*GrpcLogEntry) ProtoMessage ¶
func (*GrpcLogEntry) ProtoMessage()
func (*GrpcLogEntry) ProtoReflect ¶
func (x *GrpcLogEntry) ProtoReflect() protoreflect.Message
func (*GrpcLogEntry) Reset ¶
func (x *GrpcLogEntry) Reset()
func (*GrpcLogEntry) SetCallId ¶
func (x *GrpcLogEntry) SetCallId(v uint64)
func (*GrpcLogEntry) SetClientHeader ¶
func (x *GrpcLogEntry) SetClientHeader(v *ClientHeader)
func (*GrpcLogEntry) SetLogger ¶
func (x *GrpcLogEntry) SetLogger(v GrpcLogEntry_Logger)
func (*GrpcLogEntry) SetMessage ¶
func (x *GrpcLogEntry) SetMessage(v *Message)
func (*GrpcLogEntry) SetPayloadTruncated ¶
func (x *GrpcLogEntry) SetPayloadTruncated(v bool)
func (*GrpcLogEntry) SetPeer ¶
func (x *GrpcLogEntry) SetPeer(v *Address)
func (*GrpcLogEntry) SetSequenceIdWithinCall ¶
func (x *GrpcLogEntry) SetSequenceIdWithinCall(v uint64)
func (*GrpcLogEntry) SetServerHeader ¶
func (x *GrpcLogEntry) SetServerHeader(v *ServerHeader)
func (*GrpcLogEntry) SetTimestamp ¶
func (x *GrpcLogEntry) SetTimestamp(v *timestamppb.Timestamp)
func (*GrpcLogEntry) SetTrailer ¶
func (x *GrpcLogEntry) SetTrailer(v *Trailer)
func (*GrpcLogEntry) SetType ¶
func (x *GrpcLogEntry) SetType(v GrpcLogEntry_EventType)
func (*GrpcLogEntry) String ¶
func (x *GrpcLogEntry) String() string
func (*GrpcLogEntry) WhichPayload ¶
func (x *GrpcLogEntry) WhichPayload() case_GrpcLogEntry_Payload
type GrpcLogEntry_ClientHeader ¶
type GrpcLogEntry_ClientHeader struct {
ClientHeader *ClientHeader `protobuf:"bytes,6,opt,name=client_header,json=clientHeader,proto3,oneof"`
}
type GrpcLogEntry_EventType ¶
type GrpcLogEntry_EventType int32
Enumerates the type of event Note the terminology is different from the RPC semantics definition, but the same meaning is expressed here.
const ( GrpcLogEntry_EVENT_TYPE_UNKNOWN GrpcLogEntry_EventType = 0 // Header sent from client to server GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER GrpcLogEntry_EventType = 1 // Header sent from server to client GrpcLogEntry_EVENT_TYPE_SERVER_HEADER GrpcLogEntry_EventType = 2 // Message sent from client to server GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE GrpcLogEntry_EventType = 3 // Message sent from server to client GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE GrpcLogEntry_EventType = 4 // A signal that client is done sending GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE GrpcLogEntry_EventType = 5 // Trailer indicates the end of the RPC. // On client side, this event means a trailer was either received // from the network or the gRPC library locally generated a status // to inform the application about a failure. // On server side, this event means the server application requested // to send a trailer. Note: EVENT_TYPE_CANCEL may still arrive after // this due to races on server side. GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER GrpcLogEntry_EventType = 6 // A signal that the RPC is cancelled. On client side, this // indicates the client application requests a cancellation. // On server side, this indicates that cancellation was detected. // Note: This marks the end of the RPC. Events may arrive after // this due to races. For example, on client side a trailer // may arrive even though the application requested to cancel the RPC. GrpcLogEntry_EVENT_TYPE_CANCEL GrpcLogEntry_EventType = 7 )
func (GrpcLogEntry_EventType) Descriptor ¶
func (GrpcLogEntry_EventType) Descriptor() protoreflect.EnumDescriptor
func (GrpcLogEntry_EventType) Enum ¶
func (x GrpcLogEntry_EventType) Enum() *GrpcLogEntry_EventType
func (GrpcLogEntry_EventType) Number ¶
func (x GrpcLogEntry_EventType) Number() protoreflect.EnumNumber
func (GrpcLogEntry_EventType) String ¶
func (x GrpcLogEntry_EventType) String() string
func (GrpcLogEntry_EventType) Type ¶
func (GrpcLogEntry_EventType) Type() protoreflect.EnumType
type GrpcLogEntry_Logger ¶
type GrpcLogEntry_Logger int32
Enumerates the entity that generates the log entry
const ( GrpcLogEntry_LOGGER_UNKNOWN GrpcLogEntry_Logger = 0 GrpcLogEntry_LOGGER_CLIENT GrpcLogEntry_Logger = 1 GrpcLogEntry_LOGGER_SERVER GrpcLogEntry_Logger = 2 )
func (GrpcLogEntry_Logger) Descriptor ¶
func (GrpcLogEntry_Logger) Descriptor() protoreflect.EnumDescriptor
func (GrpcLogEntry_Logger) Enum ¶
func (x GrpcLogEntry_Logger) Enum() *GrpcLogEntry_Logger
func (GrpcLogEntry_Logger) Number ¶
func (x GrpcLogEntry_Logger) Number() protoreflect.EnumNumber
func (GrpcLogEntry_Logger) String ¶
func (x GrpcLogEntry_Logger) String() string
func (GrpcLogEntry_Logger) Type ¶
func (GrpcLogEntry_Logger) Type() protoreflect.EnumType
type GrpcLogEntry_Message ¶
type GrpcLogEntry_Message struct {
// Used by EVENT_TYPE_CLIENT_MESSAGE, EVENT_TYPE_SERVER_MESSAGE
Message *Message `protobuf:"bytes,8,opt,name=message,proto3,oneof"`
}
type GrpcLogEntry_ServerHeader ¶
type GrpcLogEntry_ServerHeader struct {
ServerHeader *ServerHeader `protobuf:"bytes,7,opt,name=server_header,json=serverHeader,proto3,oneof"`
}
type GrpcLogEntry_Trailer ¶
type GrpcLogEntry_Trailer struct {
Trailer *Trailer `protobuf:"bytes,9,opt,name=trailer,proto3,oneof"`
}
type GrpcLogEntry_builder ¶
type GrpcLogEntry_builder struct {
// The timestamp of the binary log message
Timestamp *timestamppb.Timestamp
// Uniquely identifies a call. The value must not be 0 in order to disambiguate
// from an unset value.
// Each call may have several log entries, they will all have the same call_id.
// Nothing is guaranteed about their value other than they are unique across
// different RPCs in the same gRPC process.
CallId uint64
// The entry sequence id for this call. The first GrpcLogEntry has a
// value of 1, to disambiguate from an unset value. The purpose of
// this field is to detect missing entries in environments where
// durability or ordering is not guaranteed.
SequenceIdWithinCall uint64
Type GrpcLogEntry_EventType
Logger GrpcLogEntry_Logger
// Fields of oneof Payload:
ClientHeader *ClientHeader
ServerHeader *ServerHeader
// Used by EVENT_TYPE_CLIENT_MESSAGE, EVENT_TYPE_SERVER_MESSAGE
Message *Message
Trailer *Trailer
// -- end of Payload
// true if payload does not represent the full message or metadata.
PayloadTruncated bool
// Peer address information, will only be recorded on the first
// incoming event. On client side, peer is logged on
// EVENT_TYPE_SERVER_HEADER normally or EVENT_TYPE_SERVER_TRAILER in
// the case of trailers-only. On server side, peer is always
// logged on EVENT_TYPE_CLIENT_HEADER.
Peer *Address
// contains filtered or unexported fields
}
func (GrpcLogEntry_builder) Build ¶
func (b0 GrpcLogEntry_builder) Build() *GrpcLogEntry
type Message ¶
type Message struct {
// Length of the message. It may not be the same as the length of the
// data field, as the logging payload can be truncated or omitted.
Length uint32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
// May be truncated or omitted.
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
Message payload, used by CLIENT_MESSAGE and SERVER_MESSAGE
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Message_builder ¶
type Message_builder struct {
// Length of the message. It may not be the same as the length of the
// data field, as the logging payload can be truncated or omitted.
Length uint32
// May be truncated or omitted.
Data []byte
// contains filtered or unexported fields
}
func (Message_builder) Build ¶
func (b0 Message_builder) Build() *Message
type Metadata ¶
type Metadata struct {
Entry []*MetadataEntry `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
// contains filtered or unexported fields
}
A list of metadata pairs, used in the payload of client header, server header, and server trailer. Implementations may omit some entries to honor the header limits of GRPC_BINARY_LOG_CONFIG.
Header keys added by gRPC are omitted. To be more specific, implementations will not log the following entries, and this is not to be treated as a truncation:
- entries handled by grpc that are not user visible, such as those that begin with 'grpc-' (with exception of grpc-trace-bin) or keys like 'lb-token'
- transport specific entries, including but not limited to: ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
- entries added for call credentials
Implementations must always log grpc-trace-bin if it is present. Practically speaking it will only be visible on server side because grpc-trace-bin is managed by low level client side mechanisms inaccessible from the application level. On server side, the header is just a normal metadata key. The pair will not count towards the size limit.
func (*Metadata) GetEntry ¶
func (x *Metadata) GetEntry() []*MetadataEntry
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
func (*Metadata) SetEntry ¶
func (x *Metadata) SetEntry(v []*MetadataEntry)
type MetadataEntry ¶
type MetadataEntry struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
A metadata key value pair
func (*MetadataEntry) GetKey ¶
func (x *MetadataEntry) GetKey() string
func (*MetadataEntry) GetValue ¶
func (x *MetadataEntry) GetValue() []byte
func (*MetadataEntry) ProtoMessage ¶
func (*MetadataEntry) ProtoMessage()
func (*MetadataEntry) ProtoReflect ¶
func (x *MetadataEntry) ProtoReflect() protoreflect.Message
func (*MetadataEntry) Reset ¶
func (x *MetadataEntry) Reset()
func (*MetadataEntry) SetKey ¶
func (x *MetadataEntry) SetKey(v string)
func (*MetadataEntry) SetValue ¶
func (x *MetadataEntry) SetValue(v []byte)
func (*MetadataEntry) String ¶
func (x *MetadataEntry) String() string
type MetadataEntry_builder ¶
type MetadataEntry_builder struct {
Key string
Value []byte
// contains filtered or unexported fields
}
func (MetadataEntry_builder) Build ¶
func (b0 MetadataEntry_builder) Build() *MetadataEntry
type Metadata_builder ¶
type Metadata_builder struct {
Entry []*MetadataEntry
// contains filtered or unexported fields
}
func (Metadata_builder) Build ¶
func (b0 Metadata_builder) Build() *Metadata
type ServerHeader ¶
type ServerHeader struct {
// This contains only the metadata from the application.
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}
func (*ServerHeader) ClearMetadata ¶
func (x *ServerHeader) ClearMetadata()
func (*ServerHeader) GetMetadata ¶
func (x *ServerHeader) GetMetadata() *Metadata
func (*ServerHeader) HasMetadata ¶
func (x *ServerHeader) HasMetadata() bool
func (*ServerHeader) ProtoMessage ¶
func (*ServerHeader) ProtoMessage()
func (*ServerHeader) ProtoReflect ¶
func (x *ServerHeader) ProtoReflect() protoreflect.Message
func (*ServerHeader) Reset ¶
func (x *ServerHeader) Reset()
func (*ServerHeader) SetMetadata ¶
func (x *ServerHeader) SetMetadata(v *Metadata)
func (*ServerHeader) String ¶
func (x *ServerHeader) String() string
type ServerHeader_builder ¶
type ServerHeader_builder struct {
// This contains only the metadata from the application.
Metadata *Metadata
// contains filtered or unexported fields
}
func (ServerHeader_builder) Build ¶
func (b0 ServerHeader_builder) Build() *ServerHeader
type Trailer ¶
type Trailer struct {
// This contains only the metadata from the application.
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// The gRPC status code.
StatusCode uint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
// An original status message before any transport specific
// encoding.
StatusMessage string `protobuf:"bytes,3,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
// The value of the 'grpc-status-details-bin' metadata key. If
// present, this is always an encoded 'google.rpc.Status' message.
StatusDetails []byte `protobuf:"bytes,4,opt,name=status_details,json=statusDetails,proto3" json:"status_details,omitempty"`
// contains filtered or unexported fields
}
func (*Trailer) ProtoReflect ¶
func (x *Trailer) ProtoReflect() protoreflect.Message
type Trailer_builder ¶
type Trailer_builder struct {
// This contains only the metadata from the application.
Metadata *Metadata
// The gRPC status code.
StatusCode uint32
// An original status message before any transport specific
// encoding.
StatusMessage string
// The value of the 'grpc-status-details-bin' metadata key. If
// present, this is always an encoded 'google.rpc.Status' message.
StatusDetails []byte
// contains filtered or unexported fields
}
func (Trailer_builder) Build ¶
func (b0 Trailer_builder) Build() *Trailer
Source Files
¶
- binarylog.pb.go