mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-18 22:17:44 +02:00
Make Optimal strategy default. Collapse routing tables based on strategy
This commit is contained in:
@ -149,6 +149,18 @@ const (
|
||||
Optimal
|
||||
)
|
||||
|
||||
// String returns human readable Strategy
|
||||
func (s Strategy) String() string {
|
||||
switch s {
|
||||
case All:
|
||||
return "all"
|
||||
case Optimal:
|
||||
return "optimal"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
// NewRouter creates new Router and returns it
|
||||
func NewRouter(opts ...Option) Router {
|
||||
return newRouter(opts...)
|
||||
|
Reference in New Issue
Block a user