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

Add router modifications

This commit is contained in:
Asim Aslam
2019-01-09 16:20:57 +00:00
parent ee380c6b7a
commit d004c9624b
6 changed files with 72 additions and 25 deletions

View File

@ -1,10 +1,15 @@
package server
import (
"github.com/micro/go-micro/codec"
)
type rpcRequest struct {
service string
method string
contentType string
request interface{}
codec codec.Codec
body []byte
stream bool
}
@ -14,6 +19,10 @@ type rpcMessage struct {
payload interface{}
}
func (r *rpcRequest) Codec() codec.Codec {
return r.codec
}
func (r *rpcRequest) ContentType() string {
return r.contentType
}
@ -26,8 +35,8 @@ func (r *rpcRequest) Method() string {
return r.method
}
func (r *rpcRequest) Request() interface{} {
return r.request
func (r *rpcRequest) Body() []byte {
return r.body
}
func (r *rpcRequest) Stream() bool {