Movatterモバイル変換


[0]ホーム

URL:


grpc_binarylog_v1

package
v1.77.0Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:7Imported by:22

Details

Repository

github.com/grpc/grpc-go

Links

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_protoprotoreflect.FileDescriptor

Functions

This section is empty.

Types

typeAddress

type Address struct {TypeAddress_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.binarylog.v1.Address_Type" json:"type,omitempty"`Addressstring       `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`// only for TYPE_IPV4 and TYPE_IPV6IpPortuint32 `protobuf:"varint,3,opt,name=ip_port,json=ipPort,proto3" json:"ip_port,omitempty"`// contains filtered or unexported fields}

Address information

func (*Address)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*Address)Reset

func (x *Address) Reset()

func (*Address)String

func (x *Address) String()string

typeAddress_Type

type Address_Typeint32
const (Address_TYPE_UNKNOWNAddress_Type = 0// address is in 1.2.3.4 formAddress_TYPE_IPV4Address_Type = 1// address is in IPv6 canonical form (RFC5952 section 4)// The scope is NOT included in the address string.Address_TYPE_IPV6Address_Type = 2// address is UDS stringAddress_TYPE_UNIXAddress_Type = 3)

func (Address_Type)Descriptoradded inv1.33.2

func (Address_Type)Enumadded inv1.33.2

func (xAddress_Type) Enum() *Address_Type

func (Address_Type)EnumDescriptordeprecated

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

Deprecated: Use Address_Type.Descriptor instead.

func (Address_Type)Numberadded inv1.33.2

func (Address_Type)String

func (xAddress_Type) String()string

func (Address_Type)Typeadded inv1.33.2

typeClientHeader

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.MethodNamestring `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> .Authoritystring `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`// the RPC timeoutTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"`// contains filtered or unexported fields}

func (*ClientHeader)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*ClientHeader)Reset

func (x *ClientHeader) Reset()

func (*ClientHeader)String

func (x *ClientHeader) String()string

typeGrpcLogEntry

type GrpcLogEntry struct {// The timestamp of the binary log messageTimestamp *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.CallIduint64 `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.SequenceIdWithinCalluint64                 ``/* 126-byte string literal not displayed */TypeGrpcLogEntry_EventType `protobuf:"varint,4,opt,name=type,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_EventType" json:"type,omitempty"`LoggerGrpcLogEntry_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_TrailerPayload isGrpcLogEntry_Payload `protobuf_oneof:"payload"`// true if payload does not represent the full message or metadata.PayloadTruncatedbool `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)Descriptordeprecated

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

func (*GrpcLogEntry) ProtoMessage()

func (*GrpcLogEntry)ProtoReflectadded inv1.33.2

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

func (*GrpcLogEntry)Reset

func (x *GrpcLogEntry) Reset()

func (*GrpcLogEntry)String

func (x *GrpcLogEntry) String()string

typeGrpcLogEntry_ClientHeader

type GrpcLogEntry_ClientHeader struct {ClientHeader *ClientHeader `protobuf:"bytes,6,opt,name=client_header,json=clientHeader,proto3,oneof"`}

typeGrpcLogEntry_EventType

type GrpcLogEntry_EventTypeint32

Enumerates the type of eventNote the terminology is different from the RPC semanticsdefinition, but the same meaning is expressed here.

const (GrpcLogEntry_EVENT_TYPE_UNKNOWNGrpcLogEntry_EventType = 0// Header sent from client to serverGrpcLogEntry_EVENT_TYPE_CLIENT_HEADERGrpcLogEntry_EventType = 1// Header sent from server to clientGrpcLogEntry_EVENT_TYPE_SERVER_HEADERGrpcLogEntry_EventType = 2// Message sent from client to serverGrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGEGrpcLogEntry_EventType = 3// Message sent from server to clientGrpcLogEntry_EVENT_TYPE_SERVER_MESSAGEGrpcLogEntry_EventType = 4// A signal that client is done sendingGrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSEGrpcLogEntry_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_TRAILERGrpcLogEntry_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_CANCELGrpcLogEntry_EventType = 7)

func (GrpcLogEntry_EventType)Descriptoradded inv1.33.2

func (GrpcLogEntry_EventType)Enumadded inv1.33.2

func (GrpcLogEntry_EventType)EnumDescriptordeprecated

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

Deprecated: Use GrpcLogEntry_EventType.Descriptor instead.

func (GrpcLogEntry_EventType)Numberadded inv1.33.2

func (GrpcLogEntry_EventType)String

func (GrpcLogEntry_EventType)Typeadded inv1.33.2

typeGrpcLogEntry_Logger

type GrpcLogEntry_Loggerint32

Enumerates the entity that generates the log entry

const (GrpcLogEntry_LOGGER_UNKNOWNGrpcLogEntry_Logger = 0GrpcLogEntry_LOGGER_CLIENTGrpcLogEntry_Logger = 1GrpcLogEntry_LOGGER_SERVERGrpcLogEntry_Logger = 2)

func (GrpcLogEntry_Logger)Descriptoradded inv1.33.2

func (GrpcLogEntry_Logger)Enumadded inv1.33.2

func (GrpcLogEntry_Logger)EnumDescriptordeprecated

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

Deprecated: Use GrpcLogEntry_Logger.Descriptor instead.

func (GrpcLogEntry_Logger)Numberadded inv1.33.2

func (GrpcLogEntry_Logger)String

func (xGrpcLogEntry_Logger) String()string

func (GrpcLogEntry_Logger)Typeadded inv1.33.2

typeGrpcLogEntry_Message

type GrpcLogEntry_Message struct {// Used by EVENT_TYPE_CLIENT_MESSAGE, EVENT_TYPE_SERVER_MESSAGEMessage *Message `protobuf:"bytes,8,opt,name=message,proto3,oneof"`}

typeGrpcLogEntry_ServerHeader

type GrpcLogEntry_ServerHeader struct {ServerHeader *ServerHeader `protobuf:"bytes,7,opt,name=server_header,json=serverHeader,proto3,oneof"`}

typeGrpcLogEntry_Trailer

type GrpcLogEntry_Trailer struct {Trailer *Trailer `protobuf:"bytes,9,opt,name=trailer,proto3,oneof"`}

typeMessage

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.Lengthuint32 `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)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*Message)Reset

func (x *Message) Reset()

func (*Message)String

func (x *Message) String()string

typeMetadata

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 limitsof GRPC_BINARY_LOG_CONFIG.

Header keys added by gRPC are omitted. To be more specific,implementations will not log the following entries, and this isnot to be treated as a truncation:

  • entries handled by grpc that are not user visible, such as thosethat 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 becausegrpc-trace-bin is managed by low level client side mechanismsinaccessible from the application level. On server side, theheader is just a normal metadata key.The pair will not count towards the size limit.

func (*Metadata)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*Metadata)Reset

func (x *Metadata) Reset()

func (*Metadata)String

func (x *Metadata) String()string

typeMetadataEntry

type MetadataEntry struct {Keystring `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)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*MetadataEntry)Reset

func (x *MetadataEntry) Reset()

func (*MetadataEntry)String

func (x *MetadataEntry) String()string

typeServerHeader

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

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)ProtoReflectadded inv1.33.2

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

func (*ServerHeader)Reset

func (x *ServerHeader) Reset()

func (*ServerHeader)String

func (x *ServerHeader) String()string

typeTrailer

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.StatusCodeuint32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`// An original status message before any transport specific// encoding.StatusMessagestring `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)Descriptordeprecated

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)ProtoReflectadded inv1.33.2

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

func (*Trailer)Reset

func (x *Trailer) Reset()

func (*Trailer)String

func (x *Trailer) String()string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp