Versions in this module Expand all Collapse all v0 v0.3.0 Jun 11, 2026 v0.2.0 Jun 9, 2026 Changes in this version + var ErrPluginNotFound = errors.New("plugins: plugin not found") + type Hook interface + Execute func(ctx context.Context, in HookInput) (HookOutput, error) + Name func() string + Type func() HookType + type HookChain struct + func NewHookChain(priority bool) *HookChain + func (c *HookChain) Execute(ctx context.Context, in HookInput) (HookOutput, error) + func (c *HookChain) Len() int + func (c *HookChain) Register(h Hook, priority int) + type HookInput struct + Body []byte + Headers map[string][]string + Method string + Path string + Remote string + Route string + Type HookType + type HookOutput struct + Allow bool + Headers map[string][]string + Modified bool + Status int + type HookType string + const HookOnClose + const HookOnConnect + const HookPostResponse + const HookPreRequest + type Plugin struct + func (p *Plugin) MaxCPU() time.Duration + func (p *Plugin) Module() api.Module + func (p *Plugin) Name() string + type PluginManifest struct + Checksum string + Description string + HookTypes []HookType + Name string + Signature string + Version string + type Registry struct + func NewRegistry(storePath string) (*Registry, error) + func (r *Registry) Checksum(wasm []byte) string + func (r *Registry) Get(name, version string) ([]byte, *PluginManifest, error) + func (r *Registry) Install(manifest PluginManifest, wasm []byte) error + func (r *Registry) List() []PluginManifest + func (r *Registry) Remove(name, version string) error + type Runtime struct + func NewRuntime(ctx context.Context, cfg RuntimeConfig) (*Runtime, error) + func (r *Runtime) Close(ctx context.Context) error + func (r *Runtime) Get(name string) (*Plugin, bool) + func (r *Runtime) Load(ctx context.Context, name string, wasm []byte) (*Plugin, error) + func (r *Runtime) Unload(name string) error + type RuntimeConfig struct + MaxCPUTime time.Duration + MaxMemoryMB int + type WASMHook struct + func NewWASMHook(runtime *Runtime, name string, wasm []byte, hookType HookType) (*WASMHook, error) + func (h *WASMHook) Execute(ctx context.Context, in HookInput) (HookOutput, error) + func (h *WASMHook) Name() string + func (h *WASMHook) Type() HookType