Documentation ¶
Index ¶
- Variables
- func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type Service
- func (s *Service) Nodes() []eocontext.INode
- func (s *Service) PassHost() (eocontext.PassHostMod, string)
- func (s *Service) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) (err error)
- func (s *Service) Scheme() string
- func (s *Service) TimeOut() time.Duration
- func (s *Service) Title() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorNeedUpstream = errors.New("need upstream") ErrorInvalidDiscovery = errors.New("invalid Discovery") )
View Source
var DriverName = "service_http"
Functions ¶
Types ¶
type Config ¶
type Config struct { Title string `json:"title" label:"标题"` Timeout int64 `json:"timeout" label:"请求超时时间" default:"2000" minimum:"1" title:"单位:ms,最小值:1"` Retry int `json:"retry" label:"失败重试次数"` Scheme string `json:"scheme" label:"请求协议" enum:"HTTP,HTTPS"` Discovery eosc.RequireId `` /* 153-byte string literal not displayed */ Service string `json:"service" required:"false" label:"服务名 or 配置" switch:"discovery !==''"` Nodes []string `json:"nodes" label:"静态配置" switch:"discovery===''"` Balance string `json:"balance" enum:"round-robin,ip-hash" label:"负载均衡算法"` PassHost string `` /* 245-byte string literal not displayed */ UpstreamHost string `` /* 157-byte string literal not displayed */ KeepSession bool `json:"keep_session" label:"会话保持" title:"同一用户session会被分配到同一台服务器上"` }
Config service_http驱动配置
Click to show internal directories.
Click to hide internal directories.