factory

package
Version: v0.0.0-...-656cd05 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFromMapStr

func GetConfigFromMapStr(config common.MapStr) *common.Config

func RegisterFactoryPlugin

func RegisterFactoryPlugin(name string, factory FactoryConstructor)

Types

type Factory

type Factory interface {
	Start(config []*dcommon.ConfigHolder) error
	Stop(config []*dcommon.ConfigHolder) error
	Restart(old, new *dcommon.ConfigHolder) error
}

type FactoryConstructor

type FactoryConstructor func(config *common.Config, meta Meta) (Factory, error)

type FactoryPlugin

type FactoryPlugin struct {
	Name    string
	Config  *common.Config
	Factory Factory
}

func InitFactory

func InitFactory(
	config *common.Config,
	meta Meta,
) (*FactoryPlugin, error)

type Meta

type Meta interface{}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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