Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base provides a minimal implementation of the spi.Plugin interface that plugins can embed to inherit default behaviors. It mounts a base route that returns the plugin descriptor and masked options as JSON; concrete plugins can call Base.RegisterRoutes before wiring their own endpoints.
func NewBase ¶
func NewBase(desc spi.PluginDescriptor, opts map[string]string) Base
NewBase constructs a Base with the given plugin descriptor and the plugin's option map (values) for masking and display. Options may be nil.
func (Base) RegisterMetrics ¶
func (b Base) RegisterMetrics(_ spi.MetricsRegistry)
RegisterMetrics is a no-op in the base implementation.
func (Base) RegisterRoutes ¶
RegisterRoutes registers a default handler at the plugin root that returns the plugin descriptor and current options (with secrets masked) as JSON. Concrete plugins should call this to provide a default for the base path and then add their specific endpoints.
func (Base) RegisterState ¶
func (b Base) RegisterState(_ spi.StateRegistry)
RegisterState is a no-op in the base implementation.