Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory interface { // 组件示例配置 SampleConfig() string // 组件描述 Description() string // 组件的Go Type ExampleType() reflect.Type // 创建实例 New(config string) (Component, error) }
func GetFactory ¶
func NewFactory ¶
func NewFactory(sampleConfig interface{}, description string, _type reflect.Type, factoryFunc FactoryFunc) Factory
type FactoryFunc ¶
type FactoryTemplate ¶
type FactoryTemplate struct {
// contains filtered or unexported fields
}
func (FactoryTemplate) Description ¶
func (f FactoryTemplate) Description() string
func (FactoryTemplate) ExampleType ¶ added in v1.0.4
func (f FactoryTemplate) ExampleType() reflect.Type
func (FactoryTemplate) SampleConfig ¶
func (f FactoryTemplate) SampleConfig() string
type Instance ¶
type NamedFactory ¶
func ListFactory ¶
func ListFactory() []NamedFactory
Click to show internal directories.
Click to hide internal directories.