Documentation ¶
Index ¶
- func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error
- func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type Finisher
- type HttpRouter
- type RouterDriverFactory
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Listen int `json:"listen" yaml:"listen" title:"port" description:"使用端口" default:"80" label:"端口号" maximum:"65535"` Method []string `json:"method" yaml:"method" enum:"GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS" label:"请求方式"` Host []string `json:"host" yaml:"host" label:"域名"` Path string `json:"location"` Rules []Rule `json:"rules" yaml:"rules" label:"路由规则"` Service eosc.RequireId `` /* 160-byte string literal not displayed */ Status int `json:"status" yaml:"status" label:"响应状态码" switch:"service===''" default:"200" maximum:"1000" minimum:"100"` Header map[string]string `json:"header" yaml:"header" label:"响应头部" switch:"service===''"` Body string `json:"body" yaml:"status" format:"text" label:"响应Body" switch:"service===''"` Template eosc.RequireId `` /* 132-byte string literal not displayed */ Websocket bool `json:"websocket" yaml:"websocket" label:"Websocket" switch:"service!==''"` Disable bool `json:"disable" yaml:"disable" label:"禁用路由"` Plugins plugin.Plugins `json:"plugins" yaml:"plugins" label:"插件配置"` Retry int `json:"retry" label:"重试次数" yaml:"retry" switch:"service!==''"` TimeOut int `json:"time_out" label:"超时时间" switch:"service!==''"` }
type HttpRouter ¶ added in v0.8.0
type HttpRouter struct {
// contains filtered or unexported fields
}
func (*HttpRouter) CheckSkill ¶ added in v0.8.0
func (h *HttpRouter) CheckSkill(skill string) bool
func (*HttpRouter) Destroy ¶ added in v0.8.0
func (h *HttpRouter) Destroy() error
func (*HttpRouter) Id ¶ added in v0.8.0
func (h *HttpRouter) Id() string
func (*HttpRouter) Start ¶ added in v0.8.0
func (h *HttpRouter) Start() error
func (*HttpRouter) Stop ¶ added in v0.8.0
func (h *HttpRouter) Stop() error
type RouterDriverFactory ¶
type RouterDriverFactory struct {
eosc.IExtenderDriverFactory
}
RouterDriverFactory http路由驱动工厂结构体
func NewRouterDriverFactory ¶
func NewRouterDriverFactory() *RouterDriverFactory
NewRouterDriverFactory 创建一个http路由驱动工厂
Source Files ¶
Click to show internal directories.
Click to hide internal directories.