Documentation ¶
Index ¶
- func DefaultRetryIf(req *protocol.Request, resp *protocol.Response, err error) bool
- 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 DefaultRetryIf ¶ added in v0.4.0
DefaultRetryIf Default retry condition, mainly used for idempotent requests. If this cannot be satisfied, you can implement your own retry condition.
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 }
Click to show internal directories.
Click to hide internal directories.