Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendPool ¶
type BackendPool struct { Backends []*Backend // 所有节点 Current uint64 // 当前轮到的节点索引 Port string // 本地端口 BackUp *Backend // 备用 TlsCert string // cert.pem 路径 TlsKey string // key.pem 路径 }
func (*BackendPool) GetNextPeer ¶
func (p *BackendPool) GetNextPeer(alive *IsAlive) (*Backend, int64)
func (*BackendPool) NextIndex ¶
func (p *BackendPool) NextIndex() int
type IsAlive ¶
func (*IsAlive) HealthCheck ¶
func (i *IsAlive) HealthCheck()
Click to show internal directories.
Click to hide internal directories.