Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMiddleware ¶
func DefaultMiddleware() []rivertype.Middleware
DefaultMiddleware returns the default middleware that River applies to all jobs. This includes internal middleware like the resumable step middleware.
Types ¶
type ResumableContextKey ¶
type ResumableContextKey struct{}
ResumableContextKey is the context key for ResumableState.
type ResumableMiddleware ¶
type ResumableMiddleware struct{}
ResumableMiddleware is internal middleware that enables resumable step functionality. It reads the last completed step and cursor data from job metadata, injects them into the context, and persists updated step/cursor state back to metadata when a job errors after making progress.
func (*ResumableMiddleware) IsMiddleware ¶
func (*ResumableMiddleware) IsMiddleware() bool
type ResumableState ¶
type ResumableState struct {
CompletedStep string
Cursors map[string]json.RawMessage
Err error
ResumeMatched bool
ResumeStep string
StepName string
}
ResumableState holds the state for a resumable job execution. It is stored in the context and accessed by ResumableStep and ResumableStepCursor.
Click to show internal directories.
Click to hide internal directories.