internal

package
v0.0.0-...-a413825 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL