Documentation
¶
Overview ¶
Package grpc provides getters and setters for gRPC data on our context object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetMetadata ¶
SetRPCMetadata attaches RPCMetadata to the context. This will normally be set by the middleware and correspond to a specific operation in grpc or http. This can be used to do things like cause traces to occur for an operation.
Types ¶
type Metadata ¶
type Metadata struct { // CustomerID is the customer ID for the call. This is set by the customer. CustomerID string // CallID is a unique identifier for the call. This is set by an interceptor. CallID string // Op represents the operation being performed. This is the method being // called in gRPC. This is set by an interceptor. Op string }
Metadata is a struct that contains metadata about an RPC call.
func GetMetadata ¶
GetMetadata returns the RPCMetadata attached to the context. If no RPCMetadata is attached, it returns the zero value.
Click to show internal directories.
Click to hide internal directories.