util

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProxyOpen bool
View Source
var ProxyURL string

Functions

func GetProxy

func GetProxy(ctx context.Context) func(*http.Request) (*url.URL, error)

func GetProxyTransport

func GetProxyTransport(ctx context.Context) *http.Transport

func HttpDownloadFile

func HttpDownloadFile(ctx context.Context, fileURL string, useProxy ...bool) []byte

func HttpGet

func HttpGet(ctx context.Context, url string, header map[string]string, data g.Map, result interface{}, cookies ...map[string]string) error

func HttpPost

func HttpPost(ctx context.Context, url string, header map[string]string, data, result interface{}) error

Types

type Roundrobin

type Roundrobin struct {
	CurIndex int
}

func (*Roundrobin) Roundrobin

func (roundrobin *Roundrobin) Roundrobin(values []string) (value string)

轮询模式

Jump to

Keyboard shortcuts

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