1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

switchup init

This commit is contained in:
Asim
2015-12-18 01:21:56 +00:00
parent 4cba0c57ab
commit a5be9ca585
2 changed files with 7 additions and 25 deletions

View File

@ -136,23 +136,14 @@ func (r *rpcClient) stream(ctx context.Context, address string, req Request) (St
return nil, errors.InternalServerError("go.micro.client", fmt.Sprintf("Error sending request: %v", err))
}
codec := newRpcPlusCodec(msg, c, cf)
err = codec.WriteRequest(&request{
Service: req.Service(),
ServiceMethod: req.Method(),
Seq: 0,
}, req.Request())
if err != nil {
return nil, errors.InternalServerError("go.micro.client", err.Error())
}
return &rpcStream{
stream := &rpcStream{
context: ctx,
request: req,
codec: codec,
}, nil
codec: newRpcPlusCodec(msg, c, cf),
}
err = stream.Send(req.Request())
return stream, err
}
func (r *rpcClient) CallRemote(ctx context.Context, address string, request Request, response interface{}, opts ...CallOption) error {