mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-24 22:26:54 +02:00
Fix the selectors
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user