Fix the selectors
This commit is contained in:
parent
0d50b2eb32
commit
210b810096
@ -27,7 +27,7 @@ type blackListSelector struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
cmd.Selectors["blacklist"] = NewSelector
|
cmd.DefaultSelectors["blacklist"] = NewSelector
|
||||||
rand.Seed(time.Now().Unix())
|
rand.Seed(time.Now().Unix())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
cmd.Selectors["random"] = NewSelector
|
cmd.DefaultSelectors["random"] = NewSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSelector(opts ...selector.Option) selector.Selector {
|
func NewSelector(opts ...selector.Option) selector.Selector {
|
||||||
|
@ -13,7 +13,7 @@ type roundRobinSelector struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
cmd.Selectors["roundrobin"] = NewSelector
|
cmd.DefaultSelectors["roundrobin"] = NewSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *roundRobinSelector) Select(service string, opts ...selector.SelectOption) (selector.Next, error) {
|
func (r *roundRobinSelector) Select(service string, opts ...selector.SelectOption) (selector.Next, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user