1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

remove remote func methods

This commit is contained in:
Asim Aslam
2018-04-14 16:16:58 +01:00
parent 528b5f58de
commit 07068379c6
4 changed files with 80 additions and 39 deletions

View File

@ -40,6 +40,8 @@ type Options struct {
type CallOptions struct {
SelectOptions []selector.SelectOption
// Address of remote host
Address string
// Backoff func
Backoff BackoffFunc
// Check if retriable func
@ -226,6 +228,13 @@ func DialTimeout(d time.Duration) Option {
// Call Options
// WithAddress sets the remote address to use rather than using service discovery
func WithAddress(a string) CallOption {
return func(o *CallOptions) {
o.Address = a
}
}
func WithSelectOption(so ...selector.SelectOption) CallOption {
return func(o *CallOptions) {
o.SelectOptions = append(o.SelectOptions, so...)