registry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRegistry = New()

Functions

func Create

func Create(moduleType string, ctx *mirror.ModuleContext, cfg []byte) (mirror.Module, error)

func Register

func Register(moduleType string, create FactoryFunc)

Types

type FactoryFunc

type FactoryFunc func(ctx *mirror.ModuleContext, cfg []byte) (mirror.Module, error)

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New() *Registry

func (*Registry) Create

func (r *Registry) Create(moduleType string, ctx *mirror.ModuleContext, cfg []byte) (mirror.Module, error)

func (*Registry) Register

func (r *Registry) Register(name string, create FactoryFunc)

Jump to

Keyboard shortcuts

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