Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DriverConfig ¶
type DriverConfig struct { Driver string `json:"driver" yaml:"driver"` Listen int `json:"listen" yaml:"listen"` Method []string `json:"method" yaml:"method"` Host []string `json:"host" yaml:"host"` Rules []DriverRule `json:"rules" yaml:"rules"` Protocol string `json:"protocol" yaml:"protocol"` Cert []Cert `json:"cert" yaml:"cert"` Target eosc.RequireId `json:"target" yaml:"target" skill:"github.com/eolinker/apinto/service.service.IService"` Plugins map[string]*plugin.Config `json:"plugins" yaml:"plugins"` }
DriverConfig http路由驱动配置
type DriverRule ¶
type DriverRule struct { Location string `json:"location" yaml:"location"` Header map[string]string `json:"header" yaml:"header"` Query map[string]string `json:"query" yaml:"query"` }
DriverRule http路由驱动配置Rule结构体
type HTTPRouterDriver ¶
type HTTPRouterDriver struct {
// contains filtered or unexported fields
}
HTTPRouterDriver 实现github.com/eolinker/eosc.eosc.IProfessionDriver接口
func (*HTTPRouterDriver) ConfigType ¶
func (h *HTTPRouterDriver) ConfigType() reflect.Type
ConfigType 返回http路由驱动配置的反射类型
func (*HTTPRouterDriver) Create ¶
func (h *HTTPRouterDriver) Create(id, name string, v interface{}, workers map[eosc.RequireId]interface{}) (eosc.IWorker, error)
Create 创建一个http路由驱动实例
func (*HTTPRouterDriver) NewRouter ¶
func (h *HTTPRouterDriver) NewRouter(id, name string, c *DriverConfig, target service.IServiceCreate) (*Router, error)
NewRouter 创建http路由驱动实例
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router http路由驱动实例结构体,实现了worker接口
type RouterDriverFactory ¶
type RouterDriverFactory struct { }
RouterDriverFactory http路由驱动工厂结构体
func NewRouterDriverFactory ¶
func NewRouterDriverFactory() *RouterDriverFactory
NewRouterDriverFactory 创建一个http路由驱动工厂
type RouterHandler ¶
type RouterHandler struct {
// contains filtered or unexported fields
}
func NewRouterHandler ¶
func NewRouterHandler(routerConfig *router_http.Config, routerPlugin plugin.IPlugin, handler service2.IService) *RouterHandler
func (*RouterHandler) Destroy ¶
func (r *RouterHandler) Destroy()
func (*RouterHandler) DoFilter ¶
func (r *RouterHandler) DoFilter(ctx service.IHttpContext, next service.IChain) (err error)
Click to show internal directories.
Click to hide internal directories.