Change a few things

This commit is contained in:
Asim Aslam
2019-01-10 11:39:39 +00:00
parent bb31480f1a
commit 648da5494f
5 changed files with 97 additions and 38 deletions

View File

@@ -1,10 +1,15 @@
package client
import (
"github.com/micro/go-micro/codec"
)
type rpcRequest struct {
service string
method string
contentType string
request interface{}
codec codec.Codec
body interface{}
opts RequestOptions
}
@@ -23,7 +28,7 @@ func newRequest(service, method string, request interface{}, contentType string,
return &rpcRequest{
service: service,
method: method,
request: request,
body: request,
contentType: contentType,
opts: opts,
}
@@ -41,8 +46,12 @@ func (r *rpcRequest) Method() string {
return r.method
}
func (r *rpcRequest) Request() interface{} {
return r.request
func (r *rpcRequest) Body() interface{} {
return r.body
}
func (r *rpcRequest) Codec() codec.Writer {
return r.codec
}
func (r *rpcRequest) Stream() bool {