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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user