Change a few things
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user