Switch up the selector so it actually allows you to inform it how the node performed

This commit is contained in:
Asim
2015-12-07 23:56:17 +00:00
parent 4e6b9347d9
commit 140febb081
4 changed files with 87 additions and 54 deletions

View File

@@ -14,7 +14,7 @@ type options struct {
registry registry.Registry
transport transport.Transport
wrappers []Wrapper
selector NodeSelector
selector Selector
}
// Broker to be used for pub/sub
@@ -52,8 +52,8 @@ func Transport(t transport.Transport) Option {
}
}
// Selector is used to select a node to route a request to
func Selector(s NodeSelector) Option {
// Select is used to select a node to route a request to
func Select(s Selector) Option {
return func(o *options) {
o.selector = s
}