http

package
v0.0.0-...-0eb72fb Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = NewHttp(HttpDefaultConfig) // this won't be proxied
View Source
var HttpDefaultConfig = NewConfig(&HttpDefaultRateLimit, &HttpDefaultTlsVerification, &emptyStr)
View Source
var HttpDefaultRateLimit = 60
View Source
var HttpDefaultTlsVerification = true

Functions

func CreateProxiedDialer

func CreateProxiedDialer(proxyURL string) (fasthttp.DialFunc, error)

CreateDialer returns a dialer function based on the given proxy URL and type. returns non proxied dialer if empty string is passed.

Types

type Config

type Config struct {
	HttpClient        *fasthttp.Client
	RequestsPerSecond *int
}

func NewConfig

func NewConfig(requestsPerSecond *int, skipTlsVerification *bool, proxy *string) *Config

type Http

type Http struct {
	Requests  []*client.Request
	Responses []*client.ConcurrentResponse
	Config    *Config
	Client    *client.RateLimitedClient
}

func NewHttp

func NewHttp(config *Config) *Http

Jump to

Keyboard shortcuts

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