net

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetTLSConfig

func GetTLSConfig(certFile, keyFile, caFile string) (*tls.Config, error)

getTLSConfig constructs a tls.Config that uses keys/certificates in the given files.

func GetTransport

func GetTransport(extras map[string]string, rt http.RoundTripper) *headerTransport

func NewHeaderClient

func NewHeaderClient(extras map[string]string, rt http.RoundTripper) *http.Client

NewHeaderClient returns an http.Client. It has the same behavior as DefaultClient, except that the key-value pairs in extras are added as headers on every request.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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