http

package
v0.0.0-...-5625908 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGlobalHelper

func NewGlobalHelper(opts ...Option) error

Types

type Client

type Client interface {
	R() *resty.Request
}

type Helper

type Helper struct {
	Client
	Options
}

func GetGlobalHelper

func GetGlobalHelper() *Helper

func NewHelper

func NewHelper(opts ...Option) (*Helper, error)

type Option

type Option func(*Options)

func RetryCount

func RetryCount(c int) Option

func RetryMaxWaitTime

func RetryMaxWaitTime(t time.Duration) Option

func RetryWaitTime

func RetryWaitTime(t time.Duration) Option

func Timeout

func Timeout(t time.Duration) Option

func TlsInsecureSkipVerify

func TlsInsecureSkipVerify(skip bool) Option

type Options

type Options struct {
	Tls
	Timeout time.Duration
	Retry
}
var (
	Opts *Options
)

type Retry

type Retry struct {
	Count       int
	WaitTime    time.Duration
	MaxWaitTime time.Duration
}

type Tls

type Tls struct {
	InsecureSkipVerify bool
}

Jump to

Keyboard shortcuts

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