1
0
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:
Milos Gajdos
2019-10-09 17:23:02 +01:00
parent 96e564e402
commit 837597fe6f
3 changed files with 62 additions and 8 deletions

View File

@ -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...)