Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Begin ¶
type Begin struct { // Client is true if this Begin is from client side. Client bool // BeginTime is the time when the RPC begins. BeginTime time.Time }
Begin contains stats when an RPC begins. FailFast is only valid if this Begin is from client side.
type End ¶
type End struct { // Client is true if this End is from client side. Client bool // BeginTime is the time when the RPC began. BeginTime time.Time // EndTime is the time when the RPC ends. EndTime time.Time // Error is the error the RPC ended with. It is an error generated from // status.Status and can be converted back to status.Status using // status.FromError if non-nil. Error error }
End contains stats when an RPC ends.
type Handler ¶
type Handler interface { // TagRPC can attach some information to the given context. // The context used for the rest lifetime of the RPC will be derived from // the returned context. TagRPC(context.Context, *RPCTagInfo) context.Context // HandleRPC processes the RPC stats. HandleRPC(context.Context, RPCStats) }
Handler defines the interface for the related stats handling (e.g., RPCs, connections).
type InPayload ¶
type InPayload struct { // Client is true if this InPayload is from client side. Client bool // Payload is the payload with original type. Payload interface{} // Data is the serialized message payload. Data []byte // Length is the length of uncompressed data. Length int // WireLength is the length of data on wire (compressed, signed, encrypted). WireLength int // RecvTime is the time when the payload is received. RecvTime time.Time }
InPayload contains the information for an incoming payload.
type OutPayload ¶
type OutPayload struct { // Client is true if this OutPayload is from client side. Client bool // Payload is the payload with original type. Payload interface{} // Data is the serialized message payload. Data []byte // Length is the length of uncompressed data. Length int // WireLength is the length of data on wire (compressed, signed, encrypted). WireLength int // SentTime is the time when the payload is sent. SentTime time.Time }
OutPayload contains the information for an outgoing payload.
func (*OutPayload) IsClient ¶
func (s *OutPayload) IsClient() bool
IsClient indicates if this stats information is from client side.
type RPCStats ¶
type RPCStats interface { // IsClient returns true if this RPCStats is from client side. IsClient() bool // contains filtered or unexported methods }
RPCStats contains stats information about RPCs.
type RPCTagInfo ¶
type RPCTagInfo struct { // FullMethodName is the RPC method in the format of /package.service/method. FullMethodName string }
RPCTagInfo defines the relevant information needed by RPC context tagger.
Click to show internal directories.
Click to hide internal directories.