http2client

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(clientOptions ...ClientOption) *http.Client

NewClient returns a new HTTP2 client.

To enable connections to h2c (cleartext) servers pass the allow insecure client option.

Types

type ClientOption

type ClientOption func(*clientOption)

ClientOption is an option to modify the *http.Client.

func WithH2C

func WithH2C() ClientOption

WithH2C returns a new ClientOption that allows dialing h2c (cleartext) servers.

func WithObservability

func WithObservability() ClientOption

WithObservability returns a new ClientOption to use OpenCensus tracing and metrics.

The default is to use no observability.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) ClientOption

WithTLSConfig returns a new ClientOption to use the tls.Config.

The default is to use no TLS.

Jump to

Keyboard shortcuts

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