utils

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDNS added in v0.7.0

func CheckDNS(domain string) error

func CheckNetwork added in v0.7.0

func CheckNetwork(host, port string, timeout time.Duration) error

func GatherCallFrames added in v0.6.1

func GatherCallFrames() string

func GetEncodedToken added in v0.6.0

func GetEncodedToken(username string, password string) string

func ResolvePort added in v0.7.0

func ResolvePort(port string, schema string) (string, error)

Types

type WorkerScheduler

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

func NewWorkerScheduler

func NewWorkerScheduler(workerNum int, maxWorkEverySeconds int, ctx context.Context) (*WorkerScheduler, error)

NewWorkerScheduler 创建一个并行执行的调度器,控制最大运行数和每秒最大运行数量 NewWorkerScheduler Create a parallel scheduler to control the maximum number of runs and the maximum number of runs per second 注意: task执行是无序的 Warning: task execution is out of order

func (*WorkerScheduler) Release

func (s *WorkerScheduler) Release()

func (*WorkerScheduler) Submit

func (s *WorkerScheduler) Submit(task func() error) error

func (*WorkerScheduler) WaitUntilFinish

func (s *WorkerScheduler) WaitUntilFinish()

Jump to

Keyboard shortcuts

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