grpc_binarylog_v1

package
v1.33.0-dev Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Address_Type_name = map[int32]string{
	0: "TYPE_UNKNOWN",
	1: "TYPE_IPV4",
	2: "TYPE_IPV6",
	3: "TYPE_UNIX",
}
View Source
var Address_Type_value = map[string]int32{
	"TYPE_UNKNOWN": 0,
	"TYPE_IPV4":    1,
	"TYPE_IPV6":    2,
	"TYPE_UNIX":    3,
}
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",
}
View Source
var 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,
}
View Source
var GrpcLogEntry_Logger_name = map[int32]string{
	0: "LOGGER_UNKNOWN",
	1: "LOGGER_CLIENT",
	2: "LOGGER_SERVER",
}
View Source
var GrpcLogEntry_Logger_value = map[string]int32{
	"LOGGER_UNKNOWN": 0,
	"LOGGER_CLIENT":  1,
	"LOGGER_SERVER":  2,
}

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Address information

func (*Address) Descriptor

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

func (*Address) GetAddress

func (m *Address) GetAddress() string

func (*Address) GetIpPort

func (m *Address) GetIpPort() uint32

func (*Address) GetType

func (m *Address) GetType() Address_Type

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) String

func (m *Address) String() string

func (*Address) XXX_DiscardUnknown

func (m *Address) XXX_DiscardUnknown()

func (*Address) XXX_Marshal

func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Address) XXX_Merge

func (m *Address) XXX_Merge(src proto.Message)

func (*Address) XXX_Size

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal

func (m *Address) XXX_Unmarshal(b []byte) error

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

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

func (Address_Type) String

func (x Address_Type) String() string

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              *duration.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*ClientHeader) Descriptor

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

func (*ClientHeader) GetAuthority

func (m *ClientHeader) GetAuthority() string

func (*ClientHeader) GetMetadata

func (m *ClientHeader) GetMetadata() *Metadata

func (*ClientHeader) GetMethodName

func (m *ClientHeader) GetMethodName() string

func (*ClientHeader) GetTimeout

func (m *ClientHeader) GetTimeout() *duration.Duration

func (*ClientHeader) ProtoMessage

func (*ClientHeader) ProtoMessage()

func (*ClientHeader) Reset

func (m *ClientHeader) Reset()

func (*ClientHeader) String

func (m *ClientHeader) String() string

func (*ClientHeader) XXX_DiscardUnknown

func (m *ClientHeader) XXX_DiscardUnknown()

func (*ClientHeader) XXX_Marshal

func (m *ClientHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientHeader) XXX_Merge

func (m *ClientHeader) XXX_Merge(src proto.Message)

func (*ClientHeader) XXX_Size

func (m *ClientHeader) XXX_Size() int

func (*ClientHeader) XXX_Unmarshal

func (m *ClientHeader) XXX_Unmarshal(b []byte) error

type GrpcLogEntry

type GrpcLogEntry struct {
	// The timestamp of the binary log message
	Timestamp *timestamp.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"`
	// 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Log entry we store in binary logs

func (*GrpcLogEntry) Descriptor

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

func (*GrpcLogEntry) GetCallId

func (m *GrpcLogEntry) GetCallId() uint64

func (*GrpcLogEntry) GetClientHeader

func (m *GrpcLogEntry) GetClientHeader() *ClientHeader

func (*GrpcLogEntry) GetLogger

func (m *GrpcLogEntry) GetLogger() GrpcLogEntry_Logger

func (*GrpcLogEntry) GetMessage

func (m *GrpcLogEntry) GetMessage() *Message

func (*GrpcLogEntry) GetPayload

func (m *GrpcLogEntry) GetPayload() isGrpcLogEntry_Payload

func (*GrpcLogEntry) GetPayloadTruncated

func (m *GrpcLogEntry) GetPayloadTruncated() bool

func (*GrpcLogEntry) GetPeer

func (m *GrpcLogEntry) GetPeer() *Address

func (*GrpcLogEntry) GetSequenceIdWithinCall

func (m *GrpcLogEntry) GetSequenceIdWithinCall() uint64

func (*GrpcLogEntry) GetServerHeader

func (m *GrpcLogEntry) GetServerHeader() *ServerHeader

func (*GrpcLogEntry) GetTimestamp

func (m *GrpcLogEntry) GetTimestamp() *timestamp.Timestamp

func (*GrpcLogEntry) GetTrailer

func (m *GrpcLogEntry) GetTrailer() *Trailer

func (*GrpcLogEntry) GetType

func (m *GrpcLogEntry) GetType() GrpcLogEntry_EventType

func (*GrpcLogEntry) ProtoMessage

func (*GrpcLogEntry) ProtoMessage()

func (*GrpcLogEntry) Reset

func (m *GrpcLogEntry) Reset()

func (*GrpcLogEntry) String

func (m *GrpcLogEntry) String() string

func (*GrpcLogEntry) XXX_DiscardUnknown

func (m *GrpcLogEntry) XXX_DiscardUnknown()

func (*GrpcLogEntry) XXX_Marshal

func (m *GrpcLogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrpcLogEntry) XXX_Merge

func (m *GrpcLogEntry) XXX_Merge(src proto.Message)

func (*GrpcLogEntry) XXX_OneofWrappers added in v1.30.0

func (*GrpcLogEntry) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*GrpcLogEntry) XXX_Size

func (m *GrpcLogEntry) XXX_Size() int

func (*GrpcLogEntry) XXX_Unmarshal

func (m *GrpcLogEntry) XXX_Unmarshal(b []byte) error

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

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

func (GrpcLogEntry_EventType) String

func (x GrpcLogEntry_EventType) String() string

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

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

func (GrpcLogEntry_Logger) String

func (x GrpcLogEntry_Logger) String() string

type GrpcLogEntry_Message

type GrpcLogEntry_Message struct {
	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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Message payload, used by CLIENT_MESSAGE and SERVER_MESSAGE

func (*Message) Descriptor

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

func (*Message) GetData

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

func (*Message) GetLength

func (m *Message) GetLength() uint32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type Metadata

type Metadata struct {
	Entry                []*MetadataEntry `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

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

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

func (*Metadata) GetEntry

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

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (m *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A metadata key value pair

func (*MetadataEntry) Descriptor

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

func (*MetadataEntry) GetKey

func (m *MetadataEntry) GetKey() string

func (*MetadataEntry) GetValue

func (m *MetadataEntry) GetValue() []byte

func (*MetadataEntry) ProtoMessage

func (*MetadataEntry) ProtoMessage()

func (*MetadataEntry) Reset

func (m *MetadataEntry) Reset()

func (*MetadataEntry) String

func (m *MetadataEntry) String() string

func (*MetadataEntry) XXX_DiscardUnknown

func (m *MetadataEntry) XXX_DiscardUnknown()

func (*MetadataEntry) XXX_Marshal

func (m *MetadataEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetadataEntry) XXX_Merge

func (m *MetadataEntry) XXX_Merge(src proto.Message)

func (*MetadataEntry) XXX_Size

func (m *MetadataEntry) XXX_Size() int

func (*MetadataEntry) XXX_Unmarshal

func (m *MetadataEntry) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ServerHeader) Descriptor

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

func (*ServerHeader) GetMetadata

func (m *ServerHeader) GetMetadata() *Metadata

func (*ServerHeader) ProtoMessage

func (*ServerHeader) ProtoMessage()

func (*ServerHeader) Reset

func (m *ServerHeader) Reset()

func (*ServerHeader) String

func (m *ServerHeader) String() string

func (*ServerHeader) XXX_DiscardUnknown

func (m *ServerHeader) XXX_DiscardUnknown()

func (*ServerHeader) XXX_Marshal

func (m *ServerHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerHeader) XXX_Merge

func (m *ServerHeader) XXX_Merge(src proto.Message)

func (*ServerHeader) XXX_Size

func (m *ServerHeader) XXX_Size() int

func (*ServerHeader) XXX_Unmarshal

func (m *ServerHeader) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Trailer) Descriptor

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

func (*Trailer) GetMetadata

func (m *Trailer) GetMetadata() *Metadata

func (*Trailer) GetStatusCode

func (m *Trailer) GetStatusCode() uint32

func (*Trailer) GetStatusDetails

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

func (*Trailer) GetStatusMessage

func (m *Trailer) GetStatusMessage() string

func (*Trailer) ProtoMessage

func (*Trailer) ProtoMessage()

func (*Trailer) Reset

func (m *Trailer) Reset()

func (*Trailer) String

func (m *Trailer) String() string

func (*Trailer) XXX_DiscardUnknown

func (m *Trailer) XXX_DiscardUnknown()

func (*Trailer) XXX_Marshal

func (m *Trailer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trailer) XXX_Merge

func (m *Trailer) XXX_Merge(src proto.Message)

func (*Trailer) XXX_Size

func (m *Trailer) XXX_Size() int

func (*Trailer) XXX_Unmarshal

func (m *Trailer) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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