Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyStopped = errors.New("task already has stopped")
)
Functions ¶
This section is empty.
Types ¶
type ExeOption ¶
type ExeOption func(exe *PeriodicExecutor)
type PeriodicExecutor ¶
type PeriodicExecutor struct {
// contains filtered or unexported fields
}
func NewPeriodicExecutor ¶
func NewPeriodicExecutor(timeout time.Duration, opts ...ExeOption) *PeriodicExecutor
func (*PeriodicExecutor) SetSchedulerTimeout ¶
func (pe *PeriodicExecutor) SetSchedulerTimeout(duration time.Duration) *PeriodicExecutor
func (*PeriodicExecutor) StartTask ¶
func (pe *PeriodicExecutor) StartTask(function func() bool) *PeriodicExecutor
func (*PeriodicExecutor) StopTask ¶
func (pe *PeriodicExecutor) StopTask()
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func NewInMemoryQueue ¶
func (*Queue) StartConsuming ¶
func (q *Queue) StartConsuming(f func(value interface{}))
Click to show internal directories.
Click to hide internal directories.