Documentation ¶
Index ¶
- Variables
- type AbstractLongTask
- func (task *AbstractLongTask) Aborted() (ok bool, cause error)
- func (task *AbstractLongTask) Close()
- func (task *AbstractLongTask) Heartbeat() (initialTimeout time.Duration, ch <-chan time.Duration)
- func (task *AbstractLongTask) OnAbort(cause error)
- func (task *AbstractLongTask) Touch(nextAliveTimeout time.Duration)
- type Group
- type GroupFuture
- type GroupResult
- type GroupTask
- type LongTask
- type NamedTask
- type Option
- type Options
- type Task
- type Workers
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoTimeoutInLongTask = errors.New("no timeout") ErrNoHeartbeatInLongTask = errors.New("no heartbeat") ErrLongTaskTimeout = errors.New("timeout") ErrLongTaskNormalClosed = errors.New("normal closed") )
View Source
var (
TimeoutErr = fmt.Errorf("workers execute timeout")
)
Functions ¶
This section is empty.
Types ¶
type AbstractLongTask ¶ added in v1.8.0
type AbstractLongTask struct {
// contains filtered or unexported fields
}
func NewAbstractLongTask ¶ added in v1.8.0
func NewAbstractLongTask(initialTimeout time.Duration) *AbstractLongTask
func (*AbstractLongTask) Aborted ¶ added in v1.8.0
func (task *AbstractLongTask) Aborted() (ok bool, cause error)
func (*AbstractLongTask) Close ¶ added in v1.8.0
func (task *AbstractLongTask) Close()
func (*AbstractLongTask) Heartbeat ¶ added in v1.8.0
func (task *AbstractLongTask) Heartbeat() (initialTimeout time.Duration, ch <-chan time.Duration)
func (*AbstractLongTask) OnAbort ¶ added in v1.8.0
func (task *AbstractLongTask) OnAbort(cause error)
func (*AbstractLongTask) Touch ¶ added in v1.8.0
func (task *AbstractLongTask) Touch(nextAliveTimeout time.Duration)
type Group ¶ added in v1.6.0
type Group interface { Add(key string, task GroupTask) Run(ctx context.Context) (future GroupFuture) }
type GroupFuture ¶ added in v1.6.0
type GroupFuture interface {
Wait(ctx context.Context) (result GroupResult, err error)
}
type GroupResult ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.