instantiate

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package instantiate implement InstantiateFactory

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotInitialized InstantiateFactory is not initialized
	ErrNotInitialized = errors.New("[factory] InstantiateFactory is not initialized")

	// ErrInvalidObjectType invalid object type
	ErrInvalidObjectType = errors.New("[factory] invalid object type")
)

Functions

This section is empty.

Types

type InstantiateFactory

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

InstantiateFactory is the factory that responsible for object instantiation

func (*InstantiateFactory) BuildComponents added in v0.6.0

func (f *InstantiateFactory) BuildComponents(components [][]interface{}) (err error)

BuildComponents build all registered components

func (*InstantiateFactory) GetInstance

func (f *InstantiateFactory) GetInstance(name string) (inst interface{})

GetInstance get instance by name

func (*InstantiateFactory) Initialize

func (f *InstantiateFactory) Initialize(instanceMap cmap.ConcurrentMap)

Initialize init the factory

func (*InstantiateFactory) Initialized

func (f *InstantiateFactory) Initialized() bool

Initialized check if factory is initialized

func (*InstantiateFactory) IsValidObjectType added in v0.6.0

func (f *InstantiateFactory) IsValidObjectType(inst interface{}) bool

IsValidObjectType check if is valid object type

func (*InstantiateFactory) Items

func (f *InstantiateFactory) Items() map[string]interface{}

Items return instance map

func (*InstantiateFactory) ParseInstance added in v0.6.0

func (f *InstantiateFactory) ParseInstance(eliminator string, params ...interface{}) (name string, inst interface{})

ParseInstance parse object name and type

func (*InstantiateFactory) SetInstance

func (f *InstantiateFactory) SetInstance(name string, instance interface{}) (err error)

SetInstance save instance

Jump to

Keyboard shortcuts

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