Documentation
¶
Overview ¶
Package plugincache provides a shared, reference-counted plugin manager that survives config reloads without disrupting in-flight requests. It is extracted from the webserver package so other callers (MCP server, scheduler, CLI) can reuse the same borrower semantics without importing the full web layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache holds one shared *plugins.Manager for synchronous callers, reopened when config changes. Callers Borrow the manager and must call the returned release func when done; a manager retired by Reload stays open until its last borrower releases it, so an in-flight request never observes a closed manager. Async work opens its own manager and does not use this cache.
func (*Cache) Borrow ¶
Borrow returns the current shared manager and a release func the caller MUST invoke (via defer) when finished. The manager is guaranteed open until the release func runs, even across a concurrent Reload. Returns (nil, no-op) if the manager cannot be opened; callers must tolerate nil.