Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginManager ¶
type PluginManager[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]() *PluginManager[T]
func (*PluginManager[T]) Get ¶
func (pm *PluginManager[T]) Get(name string) (p T, err error)
Get returns a plugin by name.
func (*PluginManager[T]) Register ¶
func (pm *PluginManager[T]) Register(plugin *Plugin[T]) error
Register registers a plugin.
func (*PluginManager[T]) RegisterFromFile ¶
func (pm *PluginManager[T]) RegisterFromFile(path string) error
RegisterFromFile registers a plugin from a file.
Click to show internal directories.
Click to hide internal directories.