rlhttp

package
v0.0.0-...-5888283 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...ClientOption) *Client

func (*Client) Do

func (c *Client) Do(req *retryablehttp.Request) (*http.Response, error)

type ClientOption

type ClientOption func(c *Client)

func WithDefaultRetryWaitMax

func WithDefaultRetryWaitMax(max time.Duration) ClientOption

func WithLeveledLogger

func WithLeveledLogger(logger *slog.Logger) ClientOption

func WithMaxRetries

func WithMaxRetries(max int) ClientOption

func WithRateLimiter

func WithRateLimiter(limiter *rate.Limiter) ClientOption

func WithRequestTimeout

func WithRequestTimeout(timeout time.Duration) ClientOption

func WithTransport

func WithTransport(transport http.RoundTripper) ClientOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL