Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConnectionTimeout = "server.http.client.timeout" RetryOnConnectionFailure = "server.http.retry.onConnectionFailure" RetryEnabled = "server.http.retry.enabled" RetryOnAllOperations = "server.http.retry.allOperations" MaxRetriesOnNextServiceInstance = "server.http.retry.maxRetriesOnNextServiceInstance" RetryableStatusCodes = "server.http.retry.retryableStatusCodes" ProtocolHttp = "http://" ProtocolHttps = "https://" )
View Source
const (
DefaultTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FastHttpClient ¶ added in v0.6.16
type FastHttpClient struct{}
type NetHttpClient ¶ added in v0.6.16
type NetHttpClient struct{}
type ServerPool ¶
func GetInstance ¶
func GetInstance() *ServerPool
func (*ServerPool) GetService ¶ added in v0.5.20
func (s *ServerPool) GetService(name string) *service
func (*ServerPool) GetUrl ¶ added in v0.5.20
func (s *ServerPool) GetUrl(serviceName string, path string) string
func (*ServerPool) Run ¶
func (s *ServerPool) Run(req *request.Request) (int, error)
lb对接收到的请求 进行负载均衡
func (*ServerPool) SetHttpClient ¶ added in v0.6.16
func (s *ServerPool) SetHttpClient(client client.HttpClient)
Click to show internal directories.
Click to hide internal directories.