Documentation ¶
Overview ¶
Package contextutils provides utility for adding and retrieving metadata to/from a context.
Index ¶
Constants ¶
View Source
const ( // MetadataContextKey is the key used to access metadata from a context with metadata. MetadataContextKey = contextKey("viam-metadata") // TimeRequestedMetadataKey is optional metadata in the gRPC response header that correlates // to the time right before the point cloud was captured. TimeRequestedMetadataKey = "viam-time-requested" // TimeReceivedMetadataKey is optional metadata in the gRPC response header that correlates // to the time right after the point cloud was captured. TimeReceivedMetadataKey = "viam-time-received" )
Variables ¶
This section is empty.
Functions ¶
func ContextWithMetadata ¶
ContextWithMetadata attaches a metadata map to the context.
func ContextWithMetadataUnaryClientInterceptor ¶
func ContextWithMetadataUnaryClientInterceptor( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
ContextWithMetadataUnaryClientInterceptor attempts to read metadata from the gRPC header and injects the metadata into the context if the caller has passed in a context with metadata.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.