package metadata
Import Path
google.golang.org/grpc/internal/metadata (on go.dev)
Dependency Relation
imports 4 packages, and imported by 2 packages
Involved Source Files
Package metadata contains functions to set and get metadata from addresses.
This package is experimental.
Package-Level Functions (total 5)
Get returns the metadata of addr.
Set sets (overrides) the metadata in addr.
When a SubConn is created with this address, the RPCs sent on it will all
have this metadata.
Validate validates every pair in md with ValidatePair.
ValidateKey validates a key with the following rules (pseudo-headers are
skipped):
- the key must contain one or more characters.
- the characters in the key must be in [0-9 a-z _ - .].
ValidatePair validates a key-value pair with the following rules
(pseudo-header are skipped):
- the key must contain one or more characters.
- the characters in the key must be in [0-9 a-z _ - .].
- if the key ends with a "-bin" suffix, no validation of the corresponding
value is performed.
- the characters in every value must be printable (in [%x20-%x7E]).
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux 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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |