httppool

package module
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPPool

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

HTTPPool defines the pool of HTTP requests

func New

func New(options ...Option) *HTTPPool

New constructs a new instance of HTTPPool

func (*HTTPPool) Close

func (h *HTTPPool) Close() (err error)

Close shuts down any nodes

func (*HTTPPool) Get

func (h *HTTPPool) Get(urlToGet string) (resp *http.Response, err error)

Get will randomly select a client in the pool

func (*HTTPPool) PublicIP

func (h *HTTPPool) PublicIP() (ips []string, err error)

PublicIP returns the public IP address of each connection

type Option

type Option func(h *HTTPPool)

Option is the type all options need to adhere to

func OptionDebug

func OptionDebug(debug bool) Option

OptionDebug turns on debugging

func OptionHeaders

func OptionHeaders(headers map[string]string) Option

OptionHeaders turns on debugging

func OptionNumClients

func OptionNumClients(num int) Option

OptionNumClients sets the number of clients

func OptionTimeout

func OptionTimeout(timeout time.Duration) Option

OptionTimeout sets timeout

func OptionUseTor

func OptionUseTor(usetor bool) Option

OptionuseTor turns on debugging

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL