transport

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package transport provides an net/http Transport in a single place. HTTP(S) timeout can be set with a flag. It is a separate package so libs and plugins use it instead of net/http. That way, in case HTTP(S) needs to go through a proxy or else, only this file needs to be edited. This also allows us to use our own TLS package, also extensible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByURL

func ByURL(url string) (*http.Transport, error)

ByURL returns an transport given an URL for use with a client. It extracts the hostname from URL and give it to TLS for SNI.

func Client

func Client(url string) (*http.Client, error)

Client returns a client given an URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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