grpc_binarylog_v1

package
v1.51.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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) Descriptor deprecated

func (*Address) Descriptor() ([]byte, []int)

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetAddress

func (x *Address) GetAddress() string

func (*Address) GetIpPort

func (x *Address) GetIpPort() uint32

func (*Address) GetType

func (x *Address) GetType() Address_Type

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

func (x *Address) ProtoReflect() protoreflect.Message

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

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) Enum

func (x Address_Type) Enum() *Address_Type

func (Address_Type) EnumDescriptor deprecated

func (Address_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Address_Type.Descriptor instead.

func (Address_Type) Number

func (Address_Type) String

func (x Address_Type) String() string

func (Address_Type) Type

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 identitiy.
	// 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) Descriptor deprecated

func (*ClientHeader) Descriptor() ([]byte, []int)

Deprecated: Use ClientHeader.ProtoReflect.Descriptor instead.

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) ProtoMessage

func (*ClientHeader) ProtoMessage()

func (*ClientHeader) ProtoReflect

func (x *ClientHeader) ProtoReflect() protoreflect.Message

func (*ClientHeader) Reset

func (x *ClientHeader) Reset()

func (*ClientHeader) String

func (x *ClientHeader) String() string

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 assignable 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) Descriptor deprecated

func (*GrpcLogEntry) Descriptor() ([]byte, []int)

Deprecated: Use GrpcLogEntry.ProtoReflect.Descriptor instead.

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 (m *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) ProtoMessage

func (*GrpcLogEntry) ProtoMessage()

func (*GrpcLogEntry) ProtoReflect

func (x *GrpcLogEntry) ProtoReflect() protoreflect.Message

func (*GrpcLogEntry) Reset

func (x *GrpcLogEntry) Reset()

func (*GrpcLogEntry) String

func (x *GrpcLogEntry) String() string

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) Enum

func (GrpcLogEntry_EventType) EnumDescriptor deprecated

func (GrpcLogEntry_EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrpcLogEntry_EventType.Descriptor instead.

func (GrpcLogEntry_EventType) Number

func (GrpcLogEntry_EventType) String

func (x GrpcLogEntry_EventType) String() string

func (GrpcLogEntry_EventType) Type

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) Enum

func (GrpcLogEntry_Logger) EnumDescriptor deprecated

func (GrpcLogEntry_Logger) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrpcLogEntry_Logger.Descriptor instead.

func (GrpcLogEntry_Logger) Number

func (GrpcLogEntry_Logger) String

func (x GrpcLogEntry_Logger) String() string

func (GrpcLogEntry_Logger) Type

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 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) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetData

func (x *Message) GetData() []byte

func (*Message) GetLength

func (x *Message) GetLength() uint32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

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) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetEntry

func (x *Metadata) GetEntry() []*MetadataEntry

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

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) Descriptor deprecated

func (*MetadataEntry) Descriptor() ([]byte, []int)

Deprecated: Use MetadataEntry.ProtoReflect.Descriptor instead.

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) String

func (x *MetadataEntry) String() string

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) Descriptor deprecated

func (*ServerHeader) Descriptor() ([]byte, []int)

Deprecated: Use ServerHeader.ProtoReflect.Descriptor instead.

func (*ServerHeader) GetMetadata

func (x *ServerHeader) GetMetadata() *Metadata

func (*ServerHeader) ProtoMessage

func (*ServerHeader) ProtoMessage()

func (*ServerHeader) ProtoReflect

func (x *ServerHeader) ProtoReflect() protoreflect.Message

func (*ServerHeader) Reset

func (x *ServerHeader) Reset()

func (*ServerHeader) String

func (x *ServerHeader) String() string

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) Descriptor deprecated

func (*Trailer) Descriptor() ([]byte, []int)

Deprecated: Use Trailer.ProtoReflect.Descriptor instead.

func (*Trailer) GetMetadata

func (x *Trailer) GetMetadata() *Metadata

func (*Trailer) GetStatusCode

func (x *Trailer) GetStatusCode() uint32

func (*Trailer) GetStatusDetails

func (x *Trailer) GetStatusDetails() []byte

func (*Trailer) GetStatusMessage

func (x *Trailer) GetStatusMessage() string

func (*Trailer) ProtoMessage

func (*Trailer) ProtoMessage()

func (*Trailer) ProtoReflect

func (x *Trailer) ProtoReflect() protoreflect.Message

func (*Trailer) Reset

func (x *Trailer) Reset()

func (*Trailer) String

func (x *Trailer) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL