Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry represents a group of plugins which can be loaded. This is mostly a wrapper for go-resolve, so the same semantics apply
func (*Registry) Copy ¶
Copy creates a new instance of the registry which can be modified without changing the base. The general use case for this is instances where you want a global registry of plugins, but want to add separate providers for each instance of something, such as a bot.
func (*Registry) Load ¶
Load takes a whitelist and a blacklist in glob form and returns an inject.Injector representing the loaded plugins or an error representing why the loading failed.
func (*Registry) Register ¶
Register simply ensures the provided factory is valid and adds the factory to a mapping under the given plugin name.
func (*Registry) RegisterProvider ¶
RegisterProvider registers a factory as a part of the framework, so it will always be loaded.