middlewarelookup

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareKind

type MiddlewareKind string
const (
	MiddlewareKindJobInsert MiddlewareKind = "job_insert"
	MiddlewareKindWorker    MiddlewareKind = "worker"
)

type MiddlewareLookupInterface

type MiddlewareLookupInterface interface {
	ByMiddlewareKind(kind MiddlewareKind) []rivertype.Middleware
}

MiddlewareLookupInterface is an interface to look up middlewares by middleware kind. It's commonly implemented by MiddlewareLookup, but may also be EmptyMiddlewareLookup as a memory allocation optimization for bundles where no middlewares are present.

func NewMiddlewareLookup

func NewMiddlewareLookup(middlewares []rivertype.Middleware) MiddlewareLookupInterface

NewMiddlewareLookup returns a new middleware lookup interface based on the given middlewares that satisfies MiddlewareLookupInterface. This is often middlewareLookup, but may be emptyMiddlewareLookup as an optimization for the common case of an empty middleware bundle.

Jump to

Keyboard shortcuts

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