httpclient

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RetryCounts   = 2
	RetryInterval = 3 * time.Second
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, options ...ClientOption) (client *resty.Client)

func NewClientWithRetry

func NewClientWithRetry(ctx context.Context, retryCounts int, retryInterval time.Duration, options ...ClientOption) (client *resty.Client)

Types

type ClientConfig

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

type ClientOption

type ClientOption func(*ClientConfig)

func WithClient

func WithClient(client *resty.Client) ClientOption

func WithClientTag

func WithClientTag(key string, value string) ClientOption

func WithContext

func WithContext(ctx context.Context) ClientOption

Jump to

Keyboard shortcuts

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