Documentation ¶
Index ¶
- func GenerateId() string
- func HasChinese(text string) bool
- func HttpDownloadFile(ctx context.Context, fileURL string, proxyURL ...string) []byte
- func HttpGet(ctx context.Context, url string, header map[string]string, data g.Map, ...) error
- func HttpPost(ctx context.Context, url string, header map[string]string, ...) error
- func HttpPostJson(ctx context.Context, url string, header map[string]string, ...) error
- func NewMsgId() string
- func Retry(num int, sleep time.Duration, fn func() (any, error)) (any, error)
- func WebSocketClient(ctx context.Context, wsURL string, messageType int, message []byte, ...) (*websocket.Conn, error)
- func WebSocketClientOnlyReceive(ctx context.Context, wsURL string, result chan []byte, proxyURL ...string) (*websocket.Conn, error)
- type RoundRobin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateId ¶
func GenerateId() string
func HasChinese ¶
func HttpDownloadFile ¶
func HttpPostJson ¶
func WebSocketClient ¶
Types ¶
type RoundRobin ¶
type RoundRobin struct { CurIndex int // contains filtered or unexported fields }
func (*RoundRobin) Index ¶
func (r *RoundRobin) Index(lens int) (index int)
func (*RoundRobin) PickKey ¶
func (r *RoundRobin) PickKey(keys []string) string
Click to show internal directories.
Click to hide internal directories.