Documentation
¶
Overview ¶
Package metadata define the structure of the metadata supported by gRPC library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeKeyValue ¶
func DecodeKeyValue(k, v string) (string, string, error)
DecodeKeyValue returns the original key and value corresponding to the encoded data in k, v.
func NewContext ¶
func NewContext(ctx context.Context, md MD) context.Context
NewContext creates a new context with md attached.
Types ¶
type MD ¶
type MD map[string][]string
MD is a mapping from metadata keys to values. Users should use the following two convenience functions New and Pairs to generate MD.
func FromContext ¶
func FromContext(ctx context.Context) (md MD, ok bool)
FromContext returns the MD in ctx if it exists.
Click to show internal directories.
Click to hide internal directories.