Documentation
¶
Index ¶
- type Chain
- type Module
- func (m *Module) AdvanceRecurrence(ctx context.Context, tx pgx.Tx, scheduleID string) error
- func (m *Module) Cancel(ctx context.Context, app string, f protocol.Frame) protocol.Reply
- func (m *Module) CollapseMissed(ctx context.Context, tx pgx.Tx) error
- func (m *Module) Enqueue(ctx context.Context, app string, f protocol.Frame) protocol.Reply
- func (m *Module) Extend(ctx context.Context, app string, f protocol.Frame) protocol.Reply
- func (m *Module) FinishOccurrence(ctx context.Context, tx pgx.Tx, app, event, key string) error
- func (m *Module) Set(ctx context.Context, app string, f protocol.Frame) protocol.Reply
- func (m *Module) SetAfterTx(ctx context.Context, tx pgx.Tx, app string, f protocol.Frame) protocol.Reply
- func (m *Module) SetStart(ctx context.Context, f protocol.Frame) protocol.Reply
- func (m *Module) SkipUnfinished(ctx context.Context, tx pgx.Tx, scheduleID string) (bool, error)
- func (m *Module) StartRecurring(ctx context.Context)
- func (m *Module) Throttle(ctx context.Context, app string, f protocol.Frame) protocol.Reply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
Key string `json:"key"`
Event string `json:"event"`
After string `json:"after"`
Data json.RawMessage `json:"data"`
}
func ParseChain ¶
func ParseChain(raw json.RawMessage) (Chain, error)
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AdvanceRecurrence ¶
AdvanceRecurrence arms the next clock occurrence on the same Schedule after its Delivery is acknowledged. A Schedule without a recurrence stays delivered. When several later slots are already due, it arms the latest one once.
func (*Module) CollapseMissed ¶
CollapseMissed keeps one pending Delivery for a recurring Schedule and moves that Schedule to the latest occurrence already due. Earlier missed slots are not delivered.
func (*Module) Enqueue ¶ added in v0.2.0
Enqueue creates an immediate, independently named schedule using ordinary delivery rules.
func (*Module) FinishOccurrence ¶
FinishOccurrence accepts the completion Signal for the open occurrence. The correlation key is the Schedule key. Acknowledgement does not call this.
func (*Module) SetAfterTx ¶
func (m *Module) SetAfterTx(ctx context.Context, tx pgx.Tx, app string, f protocol.Frame) protocol.Reply
SetAfterTx creates or replaces a schedule due f.After from the transaction's now().
func (*Module) SkipUnfinished ¶
SkipUnfinished records a due slot that must not start a Delivery while the previous occurrence is still awaiting its completion Signal, then arms the following slot.