Documentation ¶
Index ¶
- Constants
- Variables
- func Register(register eosc.IExtenderDriverRegister)
- type Plugin
- type PluginConfig
- type PluginManager
- func (p *PluginManager) AllWorkers() []string
- func (p *PluginManager) Check(cfg interface{}) (profession, name, driver, desc string, err error)
- func (p *PluginManager) ConfigType() reflect.Type
- func (p *PluginManager) CreateRequest(id string, conf map[string]*plugin.Config) eocontext.IChainPro
- func (p *PluginManager) Get() interface{}
- func (p *PluginManager) GetConfigType(name string) (reflect.Type, bool)
- func (p *PluginManager) Global() eocontext.IChainPro
- func (p *PluginManager) IsExists(id string) bool
- func (p *PluginManager) Mode() eosc.SettingMode
- func (p *PluginManager) Reset(conf interface{}) error
- func (p *PluginManager) Set(conf interface{}) (err error)
- type PluginObj
- type PluginWorkerConfig
- type Plugins
Constants ¶
View Source
const ( StatusDisable = "disable" StatusEnable = "enable" StatusGlobal = "global" )
Variables ¶
Functions ¶
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Plugin ¶
type Plugin struct { *PluginConfig // contains filtered or unexported fields }
type PluginConfig ¶
type PluginConfig struct { Name string `json:"name" yaml:"name" ` ID string `json:"id" yaml:"id"` Status string `json:"status" yaml:"status"` Config interface{} `json:"config" yaml:"config"` InitConfig map[string]interface{} `json:"init_config" yaml:"init_config"` }
PluginConfig 全局插件配置
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
func NewPluginManager ¶
func NewPluginManager() *PluginManager
func (*PluginManager) AllWorkers ¶
func (p *PluginManager) AllWorkers() []string
func (*PluginManager) Check ¶
func (p *PluginManager) Check(cfg interface{}) (profession, name, driver, desc string, err error)
func (*PluginManager) ConfigType ¶
func (p *PluginManager) ConfigType() reflect.Type
func (*PluginManager) CreateRequest ¶
func (*PluginManager) Get ¶
func (p *PluginManager) Get() interface{}
func (*PluginManager) GetConfigType ¶
func (p *PluginManager) GetConfigType(name string) (reflect.Type, bool)
func (*PluginManager) Global ¶ added in v0.10.0
func (p *PluginManager) Global() eocontext.IChainPro
func (*PluginManager) IsExists ¶
func (p *PluginManager) IsExists(id string) bool
func (*PluginManager) Mode ¶
func (p *PluginManager) Mode() eosc.SettingMode
func (*PluginManager) Reset ¶
func (p *PluginManager) Reset(conf interface{}) error
func (*PluginManager) Set ¶
func (p *PluginManager) Set(conf interface{}) (err error)
type PluginObj ¶
type PluginObj struct {
// contains filtered or unexported fields
}
func NewPluginObj ¶
func (*PluginObj) Chain ¶
func (p *PluginObj) Chain(ctx eoscContext.EoContext, append ...eoscContext.IFilter) error
type PluginWorkerConfig ¶
type PluginWorkerConfig struct {
Plugins []*PluginConfig `json:"plugins" yaml:"plugins"`
}
Click to show internal directories.
Click to hide internal directories.