Involved Source Files
Package metadata define the structure of the metadata supported by gRPC library.
Please refer to https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
for more information about custom-metadata.
Package-Level Type Names (total 4, in which 1 are exported)
Package-Level Functions (total 10, all are exported)
AppendToOutgoingContext returns a new context with the provided kv merged
with any existing metadata in the context. Please refer to the
documentation of Pairs for a description of kv.
DecodeKeyValue returns k, v, nil.
Deprecated: use k and v directly instead.
FromIncomingContext returns the incoming metadata in ctx if it exists. The
returned MD should not be modified. Writing to it may cause races.
Modification should be made to copies of the returned MD.
FromOutgoingContext returns the outgoing metadata in ctx if it exists. The
returned MD should not be modified. Writing to it may cause races.
Modification should be made to copies of the returned MD.
FromOutgoingContextRaw returns the un-merged, intermediary contents
of rawMD. Remember to perform strings.ToLower on the keys. The returned
MD should not be modified. Writing to it may cause races. Modification
should be made to copies of the returned MD.
This is intended for gRPC-internal use ONLY.
Join joins any number of mds into a single MD.
The order of values for each key is determined by the order in which
the mds containing those values are presented to Join.
New creates an MD from a given key-value map.
Only the following ASCII characters are allowed in keys:
- digits: 0-9
- uppercase letters: A-Z (normalized to lower)
- lowercase letters: a-z
- special characters: -_.
Uppercase letters are automatically converted to lowercase.
Keys beginning with "grpc-" are reserved for grpc-internal use only and may
result in errors if set in metadata.
NewIncomingContext creates a new context with incoming md attached.
NewOutgoingContext creates a new context with outgoing md attached. If used
in conjunction with AppendToOutgoingContext, NewOutgoingContext will
overwrite any previously-appended metadata.
Pairs returns an MD formed by the mapping of key, value ...
Pairs panics if len(kv) is odd.
Only the following ASCII characters are allowed in keys:
- digits: 0-9
- uppercase letters: A-Z (normalized to lower)
- lowercase letters: a-z
- special characters: -_.
Uppercase letters are automatically converted to lowercase.
Keys beginning with "grpc-" are reserved for grpc-internal use only and may
result in errors if set in metadata.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.