Documentation ¶
Index ¶
- func AddBackendToRegistry(registryAddr string, servername string, backendUrl *url.URL)
- func CheckBackendHealth()
- func LB(w http.ResponseWriter, r *http.Request)
- func RegistBackend(serverAddr string, serverName string, registryAddr string)
- func ServerPoolInit()
- type AddBackEndArgs
- type AddServerI
- type Backend
- type ServerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBackendToRegistry ¶
AddBackendToRegistry调用rpc注册接口
func RegistBackend ¶
RegistBackend提供注册接口
Types ¶
type AddServerI ¶
type AddServerI struct { }
func (*AddServerI) AddBackEnd ¶
func (s *AddServerI) AddBackEnd(args AddBackEndArgs, reply *int) error
AddBackEnd添加后端
type Backend ¶
type Backend struct { URL *url.URL Alive bool ReverseProxy *httputil.ReverseProxy // contains filtered or unexported fields }
Backend服务提供者
type ServerPool ¶
type ServerPool struct { ServerNameBackendsMap map[string][]*Backend ServerNameNextIndex map[string]int }
ServerPool服务提供者集合
var SP ServerPool
Click to show internal directories.
Click to hide internal directories.