Documentation ¶
Index ¶
- func AppendToClientContext(ctx context.Context, kv ...string) context.Context
- func MergeToClientContext(ctx context.Context, otherMD Metadata) context.Context
- func NewClientContext(ctx context.Context, md Metadata) context.Context
- func NewServerContext(ctx context.Context, md Metadata) context.Context
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToClientContext ¶
AppendToClientContext returns a new context with the provided kv merged with any existing metadata in the context.
func MergeToClientContext ¶
MergeToClientContext merges new metadata into ctx
func NewClientContext ¶
NewClientContext create a new context with client metadata attached.
Types ¶
type Metadata ¶
Metadata is the way of representing request headers internally.
func FromClientContext ¶
FromClientContext returns the client metadata in context if it exists.
func FromServerContext ¶
FromServerContext returns the server metadata in context if it exists.
Click to show internal directories.
Click to hide internal directories.