Expand description
Host callbacks (host.* methods) and callback contexts
(internal/pluginhost/host_callbacks.go, callback_contexts.go).
A capability call that lets the plugin call back opens a callback context and sends
its ID as host_callback_id. The context ties later callbacks to the calling plugin
instance and the request they serve (request ID for logs, cancellation) and owns
resources opened through it, which close with the context.
Structs§
- Caller
- The plugin instance making a callback.
- Context
Guard - Closes its callback context when dropped (Go’s
closeCallback). - Dispatch
- The
CallbackHandlerplugins call into. - Host
LogRequest - Request
Scope - What a callback context remembers about the request it serves.
- Stream
Close Request - Stream
Emit Request