Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookLookupInterface ¶
HookLookupInterface is an interface to look up hooks by hook kind. It's commonly implemented by HookLookup, but may also be EmptyHookLookup as a memory allocation optimization for bundles where no hooks are present.
func NewHookLookup ¶
func NewHookLookup(hooks []rivertype.Hook) HookLookupInterface
NewHookLookup returns a new hook lookup interface based on the given hooks that satisfies HookLookupInterface. This is often hookLookup, but may be emptyHookLookup as an optimization for the common case of an empty hook bundle.
type JobHookLookup ¶
type JobHookLookup struct {
// contains filtered or unexported fields
}
func NewJobHookLookup ¶
func NewJobHookLookup() *JobHookLookup
func (*JobHookLookup) ByJobArgs ¶
func (c *JobHookLookup) ByJobArgs(args rivertype.JobArgs) HookLookupInterface
ByJobArgs returns a HookLookupInterface by job args, which is a HookLookup if the job args had specific hooks (i.e. implements JobArgsWithHooks and returns a non-empty set of hooks), or an EmptyHashLookup otherwise.