Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTimeout = 30 * time.Second DefaultAttempts = 3 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
FetchWithMethod(ctx context.Context, method, path, authorization string, body io.Reader) (io.ReadCloser, error)
}
func NewHTTPClient ¶
func NewHTTPClient(options ...ClientOption) (Client, error)
type ClientOption ¶
type ClientOption func(*httpClient) error
func WithAttempts ¶
func WithAttempts(attempts uint) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
Click to show internal directories.
Click to hide internal directories.