Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorStructType = errors.New("error struct type") ErrorNeedUpstream = errors.New("need upstream") ErrorInvalidUpstream = errors.New("not upstream") )
View Source
var DriverName = "service_http"
Functions ¶
Types ¶
type AnonymousConfig ¶
type Config ¶
type Config struct { Timeout int64 `json:"timeout" label:"请求超时时间" default:"2000" minimum:"1" description:"单位:ms,最小值:1"` Retry int `json:"retry" label:"失败重试次数"` Scheme string `json:"scheme" label:"请求协议" enum:"HTTP,HTTPS"` Upstream eosc.RequireId `` /* 144-byte string literal not displayed */ UpstreamAnonymous *AnonymousConfig `json:"anonymous" label:"匿名上游" switch:"upstream===''" ` PluginConfig map[string]*plugin.Config `json:"plugins" label:"插件"` }
Config service_http驱动配置
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func NewHandlers ¶
func NewHandlers() *Handlers
func (*Handlers) List ¶
func (h *Handlers) List() []*ServiceHandler
func (*Handlers) Set ¶
func (h *Handlers) Set(id string, handler *ServiceHandler)
type IHandlers ¶
type IHandlers interface { Set(id string, handler *ServiceHandler) Del(id string) (*ServiceHandler, bool) List() []*ServiceHandler }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
type ServiceHandler ¶
type ServiceHandler struct {
// contains filtered or unexported fields
}
func (*ServiceHandler) Destroy ¶
func (s *ServiceHandler) Destroy()
func (*ServiceHandler) DoChain ¶
func (s *ServiceHandler) DoChain(ctx http_service.IHttpContext) error
func (*ServiceHandler) DoFilter ¶
func (s *ServiceHandler) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error)
Click to show internal directories.
Click to hide internal directories.