Documentation ¶
Overview ¶
Package discovery defined balancer we use interface ...
Index ¶
Constants ¶
View Source
const (
LOCALTYPE = iota
)
balancer type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer interface { Start(namespace string) error Up(addr string) (down func(error)) Get() (addr string, err error) GetHostPort() (host string, port int, err error) Vote(addr string, voteType int) error Notify() <-chan []string Close() error }
Balancer represents load balancing for downstream
func NewBalancer ¶
NewBalancer generate a balancer object by type
func NewWithHosts ¶
NewWithHosts generate a local_type balancer object by hosts
Click to show internal directories.
Click to hide internal directories.