Documentation ¶
Index ¶
- func DoDeadline(ctx context.Context, req *protocol.Request, resp *protocol.Response, ...) error
- func DoRequestFollowRedirects(ctx context.Context, req *protocol.Request, resp *protocol.Response, ...) (statusCode int, body []byte, err error)
- func DoTimeout(ctx context.Context, req *protocol.Request, resp *protocol.Response, ...) error
- func GetURL(ctx context.Context, dst []byte, url string, c Doer, ...) (statusCode int, body []byte, err error)
- func GetURLDeadline(ctx context.Context, dst []byte, url string, deadline time.Time, c Doer, ...) (statusCode int, body []byte, err error)
- func GetURLTimeout(ctx context.Context, dst []byte, url string, timeout time.Duration, c Doer, ...) (statusCode int, body []byte, err error)
- func PostURL(ctx context.Context, dst []byte, url string, postArgs *protocol.Args, c Doer, ...) (statusCode int, body []byte, err error)
- func StatusCodeIsRedirect(statusCode int) bool
- type Doer
- type DynamicConfig
- type HostClient
- type RetryIfFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoDeadline ¶
func GetURLDeadline ¶
func GetURLTimeout ¶
func StatusCodeIsRedirect ¶
StatusCodeIsRedirect returns true if the status code indicates a redirect.
Types ¶
type DynamicConfig ¶ added in v0.2.0
DynamicConfig is config set which will be confirmed when starts a request.
type HostClient ¶
type HostClient interface { Doer SetDynamicConfig(dc *DynamicConfig) CloseIdleConnections() ShouldRemove() bool ConnectionCount() int }
type RetryIfFunc ¶
RetryIfFunc signature of retry if function
Request argument passed to RetryIfFunc, if there are any request errors.
Click to show internal directories.
Click to hide internal directories.