Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProviderNotRegistered = errors.New("provider not registered")
ErrProviderNotRegistered error for unregistered providers
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory provides registration and loading of providers
type ProviderFactory ¶
type ProviderFactory struct {
// contains filtered or unexported fields
}
ProviderFactory provides access to reloading of factories
func NewProviderFactory ¶
func NewProviderFactory(registration Registration) ProviderFactory
NewProviderFactory returns a new ProviderFactory
func (*ProviderFactory) Load ¶
func (factory *ProviderFactory) Load() (interface{}, error)
Load loads the given registry
func (*ProviderFactory) Register ¶
func (factory *ProviderFactory) Register() error
Register registers the given registration with the given name
type Registration ¶
type Registration func() (interface{}, error)
Registration function to call when registrating a provider
Click to show internal directories.
Click to hide internal directories.