Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelFunc ¶
type ChannelFunc func(ctx context.Context, no *Notification) error
type CircleTask ¶
type CircleTask struct { IterCronTimes iterator.Iterable[time.Time] CronExpr string BeginTime time.Time EndTime time.Time HookBefore func() HookAfter func() *Notification // contains filtered or unexported fields }
CircleTask 循环触发任务
func NewCircleTask ¶
func NewCircleTask(notification *Notification, expr string, begin time.Time, end time.Time) *CircleTask
func (*CircleTask) Send ¶
func (ct *CircleTask) Send(ctx context.Context)
type DefaultTask ¶
type DefaultTask struct { Err chan error HookBefore func() HookAfter func() *Notification }
DefaultTask 默认任务
type Middleware ¶
type Middleware func(channelFunc ChannelFunc) ChannelFunc
type Notification ¶
func NewNotification ¶
func (*Notification) Send ¶
func (no *Notification) Send(ctx context.Context, mls ...Middleware) error
type TriggerTask ¶
type TriggerTask struct { Err chan error TriggerTime time.Time HookBefore func() HookAfter func() *Notification }
TriggerTask 定时触发任务
func NewTriggerTask ¶
func NewTriggerTask(notification *Notification, t time.Time) *TriggerTask
Click to show internal directories.
Click to hide internal directories.