package grpc_binarylog_v1
Import Path
google.golang.org/grpc/binarylog/grpc_binarylog_v1 (on go.dev)
Dependency Relation
imports 5 packages, and imported by one package
Involved Source Files
binarylog.pb.go
Package-Level Type Names (total 16, in which 15 are exported)
Address information
Address string
only for TYPE_IPV4 and TYPE_IPV6
Type Address_Type
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetAddress() string
(*T) GetIpPort() uint32
(*T) GetType() Address_Type
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*GrpcLogEntry).GetPeer() *Address
func google.golang.org/grpc/internal/binarylog.addrToProto(addr net.Addr) *Address
( T) EnumDescriptor() ([]byte, []int)
( T) String() string
T : expvar.Var
T : fmt.Stringer
T : google.golang.org/protobuf/internal/impl.enumV1
T : context.stringer
T : runtime.stringer
func (*Address).GetType() Address_Type
const Address_TYPE_IPV4
const Address_TYPE_IPV6
const Address_TYPE_UNIX
const Address_TYPE_UNKNOWN
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> .
This contains only the metadata from the application.
The name of the RPC method, which looks something like:
/<service>/<method>
Note the leading "/" character.
the RPC timeout
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetAuthority() string
(*T) GetMetadata() *Metadata
(*T) GetMethodName() string
(*T) GetTimeout() *duration.Duration
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*GrpcLogEntry).GetClientHeader() *ClientHeader
Log entry we store in binary logs
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.
Logger GrpcLogEntry_Logger
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
true if payload does not represent the full message or metadata.
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.
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.
The timestamp of the binary log message
Type GrpcLogEntry_EventType
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetCallId() uint64
(*T) GetClientHeader() *ClientHeader
(*T) GetLogger() GrpcLogEntry_Logger
(*T) GetMessage() *Message
(*T) GetPayload() isGrpcLogEntry_Payload
(*T) GetPayloadTruncated() bool
(*T) GetPeer() *Address
(*T) GetSequenceIdWithinCall() uint64
(*T) GetServerHeader() *ServerHeader
(*T) GetTimestamp() *timestamp.Timestamp
(*T) GetTrailer() *Trailer
(*T) GetType() GrpcLogEntry_EventType
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
XXX_OneofWrappers is for the internal use of the proto package.
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func google.golang.org/grpc/internal/binarylog.(*Cancel).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ClientHalfClose).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ClientHeader).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ClientMessage).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ServerHeader).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ServerMessage).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.(*ServerTrailer).toProto() *GrpcLogEntry
func google.golang.org/grpc/internal/binarylog.Sink.Write(*GrpcLogEntry) error
Enumerates the type of event
Note the terminology is different from the RPC semantics
definition, but the same meaning is expressed here.
( T) EnumDescriptor() ([]byte, []int)
( T) String() string
T : expvar.Var
T : fmt.Stringer
T : google.golang.org/protobuf/internal/impl.enumV1
T : context.stringer
T : runtime.stringer
func (*GrpcLogEntry).GetType() GrpcLogEntry_EventType
const GrpcLogEntry_EVENT_TYPE_CANCEL
const GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE
const GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER
const GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE
const GrpcLogEntry_EVENT_TYPE_SERVER_HEADER
const GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE
const GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER
const GrpcLogEntry_EVENT_TYPE_UNKNOWN
Enumerates the entity that generates the log entry
( T) EnumDescriptor() ([]byte, []int)
( T) String() string
T : expvar.Var
T : fmt.Stringer
T : google.golang.org/protobuf/internal/impl.enumV1
T : context.stringer
T : runtime.stringer
func (*GrpcLogEntry).GetLogger() GrpcLogEntry_Logger
const GrpcLogEntry_LOGGER_CLIENT
const GrpcLogEntry_LOGGER_SERVER
const GrpcLogEntry_LOGGER_UNKNOWN
Message *Message
(*T) isGrpcLogEntry_Payload()
*T : isGrpcLogEntry_Payload
Trailer *Trailer
(*T) isGrpcLogEntry_Payload()
*T : isGrpcLogEntry_Payload
Message payload, used by CLIENT_MESSAGE and SERVER_MESSAGE
May be truncated or omitted.
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.
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetData() []byte
(*T) GetLength() uint32
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*GrpcLogEntry).GetMessage() *Message
func google.golang.org/grpc/internal/binarylog.(*MethodLogger).truncateMessage(msgPb *Message) (truncated bool)
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.
Entry []*MetadataEntry
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetEntry() []*MetadataEntry
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*ClientHeader).GetMetadata() *Metadata
func (*ServerHeader).GetMetadata() *Metadata
func (*Trailer).GetMetadata() *Metadata
func google.golang.org/grpc/internal/binarylog.mdToMetadataProto(md metadata.MD) *Metadata
func google.golang.org/grpc/internal/binarylog.(*MethodLogger).truncateMetadata(mdPb *Metadata) (truncated bool)
A metadata key value pair
Key string
Value []byte
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetKey() string
(*T) GetValue() []byte
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*Metadata).GetEntry() []*MetadataEntry
This contains only the metadata from the application.
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetMetadata() *Metadata
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*GrpcLogEntry).GetServerHeader() *ServerHeader
This contains only the metadata from the application.
The gRPC status code.
The value of the 'grpc-status-details-bin' metadata key. If
present, this is always an encoded 'google.rpc.Status' message.
An original status message before any transport specific
encoding.
XXX_NoUnkeyedLiteral struct{}
XXX_sizecache int32
XXX_unrecognized []byte
(*T) Descriptor() ([]byte, []int)
(*T) GetMetadata() *Metadata
(*T) GetStatusCode() uint32
(*T) GetStatusDetails() []byte
(*T) GetStatusMessage() string
(*T) ProtoMessage()
(*T) Reset()
(*T) String() string
(*T) XXX_DiscardUnknown()
(*T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
(*T) XXX_Merge(src proto.Message)
(*T) XXX_Size() int
(*T) XXX_Unmarshal(b []byte) error
*T : google.golang.org/protobuf/runtime/protoiface.MessageV1
*T : expvar.Var
*T : fmt.Stringer
*T : google.golang.org/protobuf/internal/impl.messageV1
*T : context.stringer
*T : runtime.stringer
func (*GrpcLogEntry).GetTrailer() *Trailer
Package-Level Functions (total 2, neither is exported)
Package-Level Variables (total 15, in which 6 are exported)
Package-Level Constants (total 15, all are exported)
address is in 1.2.3.4 form
address is in IPv6 canonical form (RFC5952 section 4)
The scope is NOT included in the address string.
address is UDS string
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.
A signal that client is done sending
Header sent from client to server
Message sent from client to server
Header sent from server to client
Message sent from server to client
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.
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |