Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GorotinePoolOptFn ¶
type GorotinePoolOptFn = func(opt *gorotinePoolOpt)
GorotinePoolOptFn groutine pool option help function used to create groutine pool instance
func MaxRequestBuffer ¶
func MaxRequestBuffer(num int) GorotinePoolOptFn
MaxRequestBuffer set max request buffer size
func MaxRequestTempBuffer ¶
func MaxRequestTempBuffer(num int) GorotinePoolOptFn
MaxRequestTempBuffer set max request temp buffer size
func TickWaitTime ¶
func TickWaitTime(duration time.Duration) GorotinePoolOptFn
TickWaitTime set tick wait time
type GoroutinePool ¶
type GoroutinePool[T, R any] interface { Do(T, ResponseFn[T, R]) }
GoroutinePool[T, R] goroutine pool interface
func NewGoroutinePool ¶
func NewGoroutinePool[T, R any](fn GoFn[T, R], opts ...GorotinePoolOptFn) GoroutinePool[T, R]
NewGoroutinePool[T, R] create a new GoroutinePool[T, R] instance
type ResponseFn ¶
ResponseFn[T, R] response handle function
Click to show internal directories.
Click to hide internal directories.