Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRegistered ¶
func IsRegistered(plugin Plugin, opts ...ManagerOption) bool
IsRegistered check plugin whether registered global. Notice plugin is not check whether is nil
func Register ¶
func Register(plugin Plugin, opts ...ManagerOption)
Register registers a global plugins
Types ¶
type Base ¶
type Manager ¶
type Manager interface {
Plugins(...ManagerOption) []Plugin
Register(Plugin, ...ManagerOption) error
}
type ManagerOption ¶
type ManagerOption func(o *ManagerOptions)
func Module ¶
func Module(m string) ManagerOption
Module will scope the plugin to a specific module, e.g. the "api"
type ManagerOptions ¶
type ManagerOptions struct {
Module string
}
Click to show internal directories.
Click to hide internal directories.