diff --git a/v2/object/client.go b/v2/object/client.go index 8af2473..955cdda 100644 --- a/v2/object/client.go +++ b/v2/object/client.go @@ -235,7 +235,7 @@ func newGRPCGetClient(c *object.Client) *getObjectClient { if !ok { return nil, errors.New("can't convert interface to grpc get getClient") } - return &getObjectStream{ + return &getObjectGRPCStream{ recv: func() (*GetResponse, error) { resp, err := cli.Recv() if err != nil { @@ -262,7 +262,7 @@ func newGRPCPutClient(c *object.Client) *putObjectClient { return nil, errors.New("can't convert interface to grpc get getClient") } - return &putObjectStream{ + return &putObjectGRPCStream{ send: func(request *PutRequest) error { return cli.Send(PutRequestToGRPCMessage(request)) }, @@ -305,7 +305,7 @@ func newGRPCSearchClient(c *object.Client) *searchObjectClient { if !ok { return nil, errors.New("can't convert interface to grpc get getClient") } - return &searchObjectStream{ + return &searchObjectGRPCStream{ recv: func() (*SearchResponse, error) { resp, err := cli.Recv() if err != nil { @@ -345,7 +345,7 @@ func newGRPCGetRangeClient(c *object.Client) *getRangeObjectClient { if !ok { return nil, errors.New("can't convert interface to grpc get getClient") } - return &getRangeObjectStream{ + return &getRangeObjectGRPCStream{ recv: func() (*GetRangeResponse, error) { resp, err := cli.Recv() if err != nil { diff --git a/v2/object/client_stream.go b/v2/object/client_stream.go index 0e64860..ea9dc98 100644 --- a/v2/object/client_stream.go +++ b/v2/object/client_stream.go @@ -20,41 +20,41 @@ type ( ) type ( - getObjectStream struct { + getObjectGRPCStream struct { recv func() (*GetResponse, error) } - putObjectStream struct { + putObjectGRPCStream struct { send func(*PutRequest) error closeAndRecv func() (*PutResponse, error) } - searchObjectStream struct { + searchObjectGRPCStream struct { recv func() (*SearchResponse, error) } - getRangeObjectStream struct { + getRangeObjectGRPCStream struct { recv func() (*GetRangeResponse, error) } ) -func (s *getObjectStream) Recv() (*GetResponse, error) { +func (s *getObjectGRPCStream) Recv() (*GetResponse, error) { return s.recv() } -func (p *putObjectStream) Send(request *PutRequest) error { +func (p *putObjectGRPCStream) Send(request *PutRequest) error { return p.send(request) } -func (p *putObjectStream) CloseAndRecv() (*PutResponse, error) { +func (p *putObjectGRPCStream) CloseAndRecv() (*PutResponse, error) { return p.closeAndRecv() } -func (s *searchObjectStream) Recv() (*SearchResponse, error) { +func (s *searchObjectGRPCStream) Recv() (*SearchResponse, error) { return s.recv() } -func (r *getRangeObjectStream) Recv() (*GetRangeResponse, error) { +func (r *getRangeObjectGRPCStream) Recv() (*GetRangeResponse, error) { return r.recv() }