Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultWorkerSize is default worker size. DefaultWorkerSize = 128 // DefaultJobSize is default job size. DefaultJobSize = 100000000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gortinep ¶
type Gortinep interface { Add(Job) Start(context.Context) Gortinep Stop() Gortinep Wait() chan error }
Gortinep is base gortinep interface.
type Interceptor ¶
Interceptor provides a hook to intercept the execution of Job.
type Option ¶
type Option func(*gortinep)
Option configures gortinep.
func WithErrorChannel ¶
WithErrorChannel returns an option that sets channel for job error processed by goroutine worker. The result of each goroutine is sent to this channe.
func WithInterceptor ¶
func WithInterceptor(interceptor Interceptor) Option
WithInterceptor returns an option that sets the Interceptor implementation.
func WithJobSize ¶
WithJobSize returns an option that sets the job size.
func WithWorkerSize ¶
WithWorkerSize returns an option that sets the worker size.
Click to show internal directories.
Click to hide internal directories.