Use protocol from node metadata

This commit is contained in:
Asim Aslam
2019-01-18 12:30:39 +00:00
parent 9bd32645be
commit 6468733d98
7 changed files with 103 additions and 41 deletions

View File

@@ -2,10 +2,12 @@ package client
import (
"context"
"github.com/micro/go-micro/registry"
)
// CallFunc represents the individual call func
type CallFunc func(ctx context.Context, address string, req Request, rsp interface{}, opts CallOptions) error
type CallFunc func(ctx context.Context, node *registry.Node, req Request, rsp interface{}, opts CallOptions) error
// CallWrapper is a low level wrapper for the CallFunc
type CallWrapper func(CallFunc) CallFunc