metadata

package
v1.46.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metadata contains functions to set and get metadata from addresses.

This package is experimental.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(addr resolver.Address) metadata.MD

Get returns the metadata of addr.

func Set

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.

func Validate added in v1.46.0

func Validate(md metadata.MD) error

Validate returns an error if the input md contains invalid keys or values.

If the header is not a pseudo-header, the following items are checked: - header names must contain one or more characters from this set [0-9 a-z _ - .]. - if the header-name ends with a "-bin" suffix, no validation of the header value is performed. - otherwise, the header value must contain one or more characters from the set [%x20-%x7E].

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL