Dont expose rpc client/server

This commit is contained in:
Asim
2015-05-23 17:40:53 +01:00
parent 3d8dd6e121
commit e192f335da
8 changed files with 73 additions and 83 deletions

View File

@@ -20,7 +20,7 @@ type options struct {
type Option func(*options)
var (
DefaultClient Client = NewRpcClient()
DefaultClient Client = newRpcClient()
)
func Transport(t transport.Transport) Option {
@@ -37,6 +37,10 @@ func CallRemote(ctx context.Context, address string, request Request, response i
return DefaultClient.CallRemote(ctx, address, request, response)
}
func New(opt ...Option) Client {
return newRpcClient(opt...)
}
func NewRequest(service, method string, request interface{}) Request {
return DefaultClient.NewRequest(service, method, request)
}