11package rpc
22
33import (
4+ "context"
45 "errors"
56 "time"
6-
7- "golang.org/x/net/context"
87)
98
109// Client allows calls and notifies on the given transporter, or any protocol
@@ -20,14 +19,16 @@ type Client struct {
2019// NewClient constructs a new client from the given RPC Transporter and the
2120// ErrorUnwrapper.
2221func NewClient (xp Transporter , u ErrorUnwrapper ,
23- tagsFunc LogTagsFromContext ) * Client {
22+ tagsFunc LogTagsFromContext ,
23+ ) * Client {
2424 return & Client {xp , u , tagsFunc , nil }
2525}
2626
2727// NewClientWithSendNotifier constructs a new client from the given RPC Transporter, the
2828// ErrorUnwrapper, and the SendNotifier
2929func NewClientWithSendNotifier (xp Transporter , u ErrorUnwrapper ,
30- tagsFunc LogTagsFromContext , sendNotifier SendNotifier ) * Client {
30+ tagsFunc LogTagsFromContext , sendNotifier SendNotifier ,
31+ ) * Client {
3132 return & Client {xp , u , tagsFunc , sendNotifier }
3233}
3334
@@ -52,12 +53,14 @@ func (c *Client) Call(ctx context.Context, method string, arg interface{}, res i
5253// CallCompressed acts as Call but allows the response to be compressed with
5354// the given CompressionType.
5455func (c * Client ) CallCompressed (ctx context.Context , method string ,
55- arg interface {}, res interface {}, ctype CompressionType , timeout time.Duration ) error {
56+ arg interface {}, res interface {}, ctype CompressionType , timeout time.Duration ,
57+ ) error {
5658 return c .call (ctx , method , arg , res , ctype , timeout )
5759}
5860
5961func (c * Client ) call (ctx context.Context , method string ,
60- arg interface {}, res interface {}, ctype CompressionType , timeout time.Duration ) error {
62+ arg interface {}, res interface {}, ctype CompressionType , timeout time.Duration ,
63+ ) error {
6164 if ctx == nil {
6265 return errors .New ("No Context provided for this call" )
6366 }
0 commit comments