Accept a range of addresses

This commit is contained in:
Asim Aslam
2019-06-26 20:51:13 +01:00
parent 940ea94a96
commit 0da8256426
3 changed files with 24 additions and 17 deletions

View File

@@ -43,8 +43,8 @@ type Options struct {
type CallOptions struct {
SelectOptions []selector.SelectOption
// Address of remote host
Address string
// Address of remote hosts
Address []string
// Backoff func
Backoff BackoffFunc
// Check if retriable func
@@ -245,8 +245,8 @@ func WithExchange(e string) PublishOption {
}
}
// WithAddress sets the remote address to use rather than using service discovery
func WithAddress(a string) CallOption {
// WithAddress sets the remote addresses to use rather than using service discovery
func WithAddress(a ...string) CallOption {
return func(o *CallOptions) {
o.Address = a
}