Dont expose rpc client/server
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user