http

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(cfg *ClientConfig) (*http.Client, error)

New creates a new HTTP client

func NewTransport

func NewTransport(cfg *TransportConfig) (*http.Transport, error)

NewTransport creates a http.Transport

Types

type ClientConfig

type ClientConfig struct {
	Transport *TransportConfig    `json:"transport,omitempty"`
	Timeout   *kilntypes.Duration `json:"timeout,omitempty"`
}

Config for creating an HTTP Client

func (*ClientConfig) SetDefault

func (cfg *ClientConfig) SetDefault() *ClientConfig

type TransportConfig

type TransportConfig struct {
	Dialer                *kilnnet.DialerConfig
	IdleConnTimeout       *kilntypes.Duration
	ResponseHeaderTimeout *kilntypes.Duration
	ExpectContinueTimeout *kilntypes.Duration
	MaxIdleConnsPerHost   int
	MaxConnsPerHost       int
	DisableKeepAlives     bool
	DisableCompression    bool
	EnableHTTP2           bool

	TLS *kilntls.Config
}

TransportConfig options to configure communication between Traefik and the servers

func (*TransportConfig) SetDefault

func (cfg *TransportConfig) SetDefault() *TransportConfig

Directories

Path Synopsis
Package httptestutils is a generated GoMock package.
Package httptestutils is a generated GoMock package.

Jump to

Keyboard shortcuts

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