config

package
v0.0.35-rc Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 3 Imported by: 11

Documentation

Index

Constants

View Source
const DefaultIgnoreSSLVerification = false
View Source
const DefaultRetries = 0
View Source
const DefaultTimeout = 120 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpConfig

type HttpConfig struct {
	Timeout               time.Duration
	Retries               int
	HttpProxy             *Proxy
	IgnoreSSLVerification bool
	HttpHandler           *httphandler.HttpHandler
}

func DefaultHttpConfig

func DefaultHttpConfig() *HttpConfig

func (*HttpConfig) WithHttpHandler

func (config *HttpConfig) WithHttpHandler(handler *httphandler.HttpHandler) *HttpConfig

func (*HttpConfig) WithIgnoreSSLVerification

func (config *HttpConfig) WithIgnoreSSLVerification(ignore bool) *HttpConfig

func (*HttpConfig) WithProxy

func (config *HttpConfig) WithProxy(proxy *Proxy) *HttpConfig

func (*HttpConfig) WithRetries

func (config *HttpConfig) WithRetries(retries int) *HttpConfig

func (*HttpConfig) WithTimeout

func (config *HttpConfig) WithTimeout(timeout time.Duration) *HttpConfig

type Proxy

type Proxy struct {
	Schema   string
	Host     string
	Port     int
	Username string
	Password string
}

func NewProxy

func NewProxy() *Proxy

func (*Proxy) GetProxyUrl

func (p *Proxy) GetProxyUrl() string

func (*Proxy) WithHost

func (p *Proxy) WithHost(host string) *Proxy

func (*Proxy) WithPassword

func (p *Proxy) WithPassword(pwd string) *Proxy

func (*Proxy) WithPort

func (p *Proxy) WithPort(port int) *Proxy

func (*Proxy) WithSchema

func (p *Proxy) WithSchema(schema string) *Proxy

func (*Proxy) WithUsername

func (p *Proxy) WithUsername(name string) *Proxy

Jump to

Keyboard shortcuts

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