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