selector: new selector interface with random & roundrobin implementation (#1761)

* selector: implement new selector interface plus random & roundrobin implementations

* selector/roundrobin: remove unused consts

* router: add close method to interface

* selector/roundrobin: fix concurrent map iteration and map write

* selector: replace variadic argument on Select
This commit is contained in:
ben-toogood
2020-06-30 14:54:38 +01:00
committed by GitHub
parent a95accad56
commit 6337c92cd0
7 changed files with 317 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package random
import (
"testing"
"github.com/micro/go-micro/v2/selector"
)
func TestRandom(t *testing.T) {
selector.Tests(t, NewSelector())
}