impl

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection[H any, V any] interface {
	// Registry returns a plugin-scoped Registry for hook registration.
	Registry(pluginID string) hook.Registry[H, V]

	// Provider retrieves applicable hooks for the given context, kinds, and value.
	hook.Provider[H, V]
}

Collection combines Registry and Provider interfaces for a given handler type. It supports multi-plugin isolation and filtered access to handlers.

func NewCollection

func NewCollection[H any, V any](
	pc plugin.Client,
) Collection[H, V]

NewCollection creates a new plugin-aware collection of hooks, allowing registration and filtered retrieval of handlers by plugin ID.

type Events

type Events[T any] = Collection[hook.EventFunc[T], T]

Events is a plugin-aware event collection for non-mutating lifecycle hooks.

func NewEvents

func NewEvents[T any](pc plugin.Client) Events[T]

NewEvents creates a plugin-aware hook collection for event hooks.

type Mutators

type Mutators[T any] = Collection[hook.MutatorFunc[T], T]

Mutators is a plugin-aware hook collection for value-transforming hooks.

func NewMutators

func NewMutators[T any](pc plugin.Client) Mutators[T]

NewMutators creates a plugin-aware hook collection for mutation hooks.

Jump to

Keyboard shortcuts

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