package metadata
import "github.com/etcd-io/etcd/Godeps/_workspace/src/google.golang.org/grpc/metadata"
Package metadata define the structure of the metadata supported by gRPC library.
Index ¶
- func DecodeKeyValue(k, v string) (string, string, error)
- func NewContext(ctx context.Context, md MD) context.Context
- type MD
Functions ¶
func DecodeKeyValue ¶
DecodeKeyValue returns the original key and value corresponding to the encoded data in k, v.
func NewContext ¶
NewContext creates a new context with md attached.
Types ¶
type MD ¶
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 ¶
FromContext returns the MD in ctx if it exists.
func New ¶
New creates a MD from given key-value map.
func Pairs ¶
Pairs returns an MD formed by the mapping of key, value ... Pairs panics if len(kv) is odd.
func (MD) Copy ¶
Copy returns a copy of md.
func (MD) Len ¶
Len returns the number of items in md.
Source Files ¶
- Version
- v2.3.8+incompatible (latest)
- Published
- Feb 16, 2017
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 month ago –
Tools for package owners.