Documentation ¶
Index ¶
- Variables
- func StackRecord() string
- type Option
- func WithEnqueueTimeout(t time.Duration) Option
- func WithHandler(h func(msg interface{})) Option
- func WithMaxIdleWorker(num int) Option
- func WithMaxWorker(member int) Option
- func WithQueueName(name string) Option
- func WithQueueSize(num int) Option
- func WithWatchPeriod(t time.Duration) Option
- func WithWorkerMaxWaiting(duration time.Duration) Option
- type WorkQueue
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWorkQueueStopped = errors.New("work-queue has stopped") ErrEnqueueTimeout = errors.New("enqueue timeout") )
Functions ¶
func StackRecord ¶
func StackRecord() string
Types ¶
type Option ¶
type Option func(*WorkQueue)
func WithEnqueueTimeout ¶
func WithHandler ¶
func WithHandler(h func(msg interface{})) Option
func WithMaxIdleWorker ¶
func WithMaxWorker ¶
func WithQueueName ¶
func WithQueueSize ¶
func WithWatchPeriod ¶
func WithWorkerMaxWaiting ¶
type WorkQueue ¶
type WorkQueue struct {
// contains filtered or unexported fields
}
func NewQueueWithOptions ¶
func NewQueueWithWatch ¶
func (*WorkQueue) EnqueueWithTimeout ¶
Click to show internal directories.
Click to hide internal directories.