Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoroutinePool ¶
type GoroutinePool[T, R any] interface { Start() Stop() Do(T, ResponseFn[T, R]) }
GoroutinePool[T, R] goroutine pool interface
func NewGoroutinePool ¶
func NewGoroutinePool[T, R any](fn DoFn[T, R], opts ...Option) GoroutinePool[T, R]
NewGoroutinePool[T, R] create a new GoroutinePool[T, R] instance
type GoroutinePool2 ¶ added in v0.5.0
GoroutinePool2[T] goroutine pool interface
func NewGoroutinePool2 ¶ added in v0.5.0
func NewGoroutinePool2[T any](fn RunFn[T], opts ...Option) GoroutinePool2[T]
NewGoroutinePool2[T] create a new GoroutinePool[T, R] instance
type Option ¶ added in v0.6.0
type Option = func(opt *gorotinePoolOpt)
Option groutine pool option help function used to create groutine pool instance
func MaxRequestBufOpt ¶ added in v0.2.0
MaxRequestBufOpt set max request buffer size
func MaxRequestTempBufOpt ¶ added in v0.2.0
MaxRequestTempBufOpt set max request temp buffer size
func MaxTempWorkerOpt ¶ added in v0.9.4
func MaxTickCountOpt ¶ added in v0.2.0
MaxTickCountOpt set max tick count
func TickWaitTimeOpt ¶ added in v0.2.0
TickWaitTimeOpt set tick wait time
func WorkerHookOpt ¶ added in v0.9.1
func WorkerHookOpt(h WorkerHook) Option
WorkerHookOpt set wroker hook
type ResponseFn ¶
ResponseFn[T, R] response handle function
type WorkerHook ¶ added in v0.9.1
WorkerHook hook worker status
Click to show internal directories.
Click to hide internal directories.