plugin

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package plugin is the Phase-1 host registry for Interseptor extensions (see docs/product/prd-0005-extensions.md). v1 is in-process only: first-party packages register hooks at init/enable time. Third-party load models (UI slots, WASM/Starlark host) come in later phases.

Hook signatures deliberately carry only IDs and small scalars — never store or proxy types — so extensions cannot create an import cycle and cannot stall the proxy hot path. Do any real work (DB reads, network, notifications) in a goroutine; emitters run hooks best-effort and never block forwarding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitFlowCaptured

func EmitFlowCaptured(flowID int64)

EmitFlowCaptured invokes registered flow hooks outside any caller lock.

func EmitScanIssue added in v1.7.0

func EmitScanIssue(flowID int64, severity, title string)

EmitScanIssue invokes registered scan-issue hooks outside any caller lock.

func OnFlowCaptured

func OnFlowCaptured(h FlowHook)

OnFlowCaptured registers a flow hook. Safe for concurrent use.

func OnScanIssue added in v1.7.0

func OnScanIssue(h ScanIssueHook)

OnScanIssue registers a scan-issue hook. Safe for concurrent use.

func Reset

func Reset()

Reset clears all hooks (tests only).

Types

type FlowHook

type FlowHook func(flowID int64)

FlowHook is called after a flow reaches its final recorded state. Best-effort: it must not block the proxy hot path — do heavy work in a goroutine.

type ScanIssueHook added in v1.7.0

type ScanIssueHook func(flowID int64, severity, title string)

ScanIssueHook is called after the scanner records an issue against a flow. Best-effort, same non-blocking contract as FlowHook.

Directories

Path Synopsis
Package annotator is the official example Interseptor extension (see docs/extensions.md and issue #25).
Package annotator is the official example Interseptor extension (see docs/extensions.md and issue #25).

Jump to

Keyboard shortcuts

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