Documentation
¶
Index ¶
- Variables
- type Headers
- type Options
- type Pool
- func (c *Pool) Delete(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) DeleteTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) Do(req *http.Request) (rp *Response, err error)
- func (c *Pool) Get(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) GetTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) Head(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) HeadTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) Options(ctx context.Context, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) OptionsTimeout(timeout time.Duration, url string, headers Headers) (rp *Response, err error)
- func (c *Pool) Post(ctx context.Context, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Pool) PostTimeout(timeout time.Duration, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Pool) Put(ctx context.Context, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Pool) PutTimeout(timeout time.Duration, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Pool) Request(ctx context.Context, method, url string, body []byte, headers Headers) (rp *Response, err error)
- func (c *Pool) RequestTimeout(timeout time.Duration, method, url string, body []byte, headers Headers) (rp *Response, err error)
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultOptions = func() Options { return Options{ MaxIdleConns: 8, MaxIdleConnsPerHost: 2, MaxConnsPerHost: 8, TimeoutSec: 30, DialTimeoutSec: 30, IdleConnTimeoutSec: 60, KeepaliveSec: 60, WriteBufferSize: 4 << 10, ReadBufferSize: 4 << 10, } } )
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"`
MaxIdleConnsPerHost int `json:"maxIdleConnsPerHost" yaml:"maxIdleConnsPerHost"`
MaxConnsPerHost int `json:"maxConnsPerHost" yaml:"maxConnsPerHost"`
TimeoutSec int `json:"timeoutSec" yaml:"timeoutSec"`
DialTimeoutSec int `json:"dialTimeoutSec" yaml:"dialTimeoutSec"`
IdleConnTimeoutSec int `json:"idleConnTimeoutSec" yaml:"idleConnTimeoutSec"`
DisableKeepAlives bool `json:"disableKeepAlives" yaml:"disableKeepAlives"`
DisableCompression bool `json:"disableCompression" yaml:"disableCompression"`
KeepaliveSec int `json:"keepaliveSec" yaml:"keepaliveSec"`
WriteBufferSize int `json:"writeBufferSize" yaml:"writeBufferSize"`
ReadBufferSize int `json:"readBufferSize" yaml:"readBufferSize"`
}
func (*Options) DialTimeout ¶
func (*Options) IdleConnTimeout ¶
func (*Options) KeepaliveTime ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) DeleteTimeout ¶
func (*Pool) GetTimeout ¶
func (*Pool) HeadTimeout ¶
func (*Pool) OptionsTimeout ¶
func (*Pool) PostTimeout ¶
func (*Pool) PutTimeout ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) UnmarshalJson ¶
Click to show internal directories.
Click to hide internal directories.