Documentation
¶
Overview ¶
Package lifecycle owns the plugin-level root context. Background work that must outlive an HTTP request or hook (LLM streaming, title generation, summarization) derives from Context() instead of context.Background() so that OnDeactivate can cancel all of it at once with ErrShutdown as the cause, letting streams distinguish a plugin shutdown from a user stop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrShutdown = errors.New("plugin is shutting down")
ErrShutdown is the cancellation cause attached to the root context when the plugin is deactivating.
Functions ¶
func Context ¶
Context returns the current plugin root context. Before Start it is context.Background().
func IsShutdown ¶
IsShutdown reports whether ctx was canceled because the plugin is shutting down (as opposed to a user stop or request cancellation).
Types ¶
This section is empty.