tools

package
v0.0.0-...-ecf5411 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTimestamp

func CurrentTimestamp() int

返回当前的时间戳,精确到ms

func FastHttpClient

func FastHttpClient(addr string, timeout int) *fasthttp.Client

func IsValidIp

func IsValidIp(ip string) (int, bool)

func IsValidIpAddress

func IsValidIpAddress(ipp string) error

func Shuffle

func Shuffle(swap Swap, length int)

func SplitIp

func SplitIp(ipp string) (ip string, port int)

split ip to ip and port if port is not valid ,port will return -2

Types

type AddrClient

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

func (*AddrClient) GetClient

func (c *AddrClient) GetClient(addr string, timeout int) *fasthttp.Client

type Swap

type Swap func(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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