riverplugin

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: MPL-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPlugins

func DefaultPlugins() []rivertype.Plugin

DefaultPlugins returns the default plugins 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

func (*ResumableMiddleware) IsPlugin

func (*ResumableMiddleware) IsPlugin() bool

func (*ResumableMiddleware) Work

func (*ResumableMiddleware) Work(ctx context.Context, job *rivertype.JobRow, doInner func(ctx context.Context) error) error

type ResumableState

type ResumableState struct {
	AllStepNames  map[string]struct{}
	CompletedStep string
	Cursors       map[string]json.RawMessage
	CursorsDirty  bool
	Err           error
	// PendingCursorSteps contains unmatched targets from cursor-only metadata.
	PendingCursorSteps []string
	ResumeMatched      bool
	ResumeStep         string
	StepActive         bool
	StepName           string
}

ResumableState holds the state for a resumable job execution. It is stored in the context and accessed by ResumableStep and ResumableStepCursor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL