Documentation
¶
Overview ¶
Package capability lets an embedder narrow what DTL code may do as execution crosses into a user-defined function.
DTL itself has no notion of who owns a function or what it is allowed to touch — that is the embedder's model. So this package carries no policy: it provides the hook the executor calls, and the embedder supplies the meaning.
Absence means unrestricted, deliberately. An embedder that installs no interceptor gets a plain interpreter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enter ¶
Enter is called by the executor immediately before running a user function. With no interceptor installed the gate is inert.
func WithInterceptor ¶
func WithInterceptor(ctx context.Context, fn Interceptor) context.Context
WithInterceptor attaches an Interceptor to ctx. A nil Interceptor attaches nothing, so callers need not branch.
Types ¶
type Interceptor ¶
Interceptor re-scopes ctx as execution enters functionName. Returning ctx unchanged leaves the caller's authority in place.