fix repocard issues (#21)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-08-25 15:41:48 +03:00
committed by GitHub
parent 8076e410a9
commit 67ab44593b
13 changed files with 68 additions and 38 deletions

View File

@@ -4,13 +4,14 @@ import (
"github.com/unistack-org/micro/v3/selector"
)
// NewSelector returns an initalised round robin selector
// NewSelector returns an initialised round robin selector
func NewSelector(opts ...selector.Option) selector.Selector {
return new(roundrobin)
}
type roundrobin struct{}
// Select return routes based on algo
func (r *roundrobin) Select(routes []string, opts ...selector.SelectOption) (selector.Next, error) {
if len(routes) == 0 {
return nil, selector.ErrNoneAvailable