Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBExecutor ¶
type DBExecutor interface {
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}
DBExecutor abstracts database operations for host functions.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the host-side resources that host functions can access. Each plugin instantiation creates a filtered view based on its manifest.
func NewRegistry ¶
func NewRegistry( httpClient *http.Client, db DBExecutor, logger func(string), ) *Registry
NewRegistry creates a new host function registry.
func (*Registry) InstantiateModule ¶
func (r *Registry) InstantiateModule( ctx context.Context, rt wazero.Runtime, manifest *capability.Manifest, ) (api.Module, error)
InstantiateModule creates a wazero host module exposing only the host functions allowed by the given manifest. If the manifest is nil or declares no capabilities, no module is instantiated (returns nil, nil).
Click to show internal directories.
Click to hide internal directories.