config

package
v0.0.89 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 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 DialContext added in v0.0.71

type DialContext func(ctx context.Context, network string, addr string) (net.Conn, error)

type HttpConfig

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

func DefaultHttpConfig

func DefaultHttpConfig() *HttpConfig

func (*HttpConfig) WithDialContext added in v0.0.71

func (config *HttpConfig) WithDialContext(dial DialContext) *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