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.
Click to show internal directories.
Click to hide internal directories.