Documentation ¶
Index ¶
- Constants
- func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type Script
- func (a *Script) CheckSkill(skill string) bool
- func (a *Script) Destroy()
- func (a *Script) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err error)
- func (a *Script) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
- func (a *Script) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error
- func (a *Script) Start() error
- func (a *Script) Stop() error
Constants ¶
View Source
const (
Name = "script_handler"
)
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
初始化插件执行实例
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Config ¶
type Config struct { Script string `json:"script" label:"调用的脚本"` Package string `json:"package" label:"调用的包名"` Fname string `json:"fname" label:"调用函数名,需定义时返回error"` Stage string `json:"stage" label:"脚本执行阶段,request或response,默认request"` }
参数配置属性
type Script ¶
type Script struct { drivers.WorkerBase // contains filtered or unexported fields }
func (*Script) CheckSkill ¶
func (*Script) DoHttpFilter ¶
func (a *Script) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) error
DoHttpFilter 核心http处理方法
Click to show internal directories.
Click to hide internal directories.