2015-12-02 20:56:50 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
type rpcRequest struct {
|
|
|
|
service string
|
|
|
|
method string
|
|
|
|
contentType string
|
|
|
|
request interface{}
|
2015-12-02 21:12:09 +00:00
|
|
|
stream bool
|
2015-12-02 20:56:50 +00:00
|
|
|
}
|
|
|
|
|
2018-04-14 18:21:02 +01:00
|
|
|
type rpcMessage struct {
|
2015-12-02 20:56:50 +00:00
|
|
|
topic string
|
|
|
|
contentType string
|
2018-04-14 18:21:02 +01:00
|
|
|
payload interface{}
|
2015-12-02 20:56:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rpcRequest) ContentType() string {
|
|
|
|
return r.contentType
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rpcRequest) Service() string {
|
|
|
|
return r.service
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rpcRequest) Method() string {
|
|
|
|
return r.method
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rpcRequest) Request() interface{} {
|
|
|
|
return r.request
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rpcRequest) Stream() bool {
|
|
|
|
return r.stream
|
|
|
|
}
|
|
|
|
|
2018-04-14 18:21:02 +01:00
|
|
|
func (r *rpcMessage) ContentType() string {
|
2015-12-02 20:56:50 +00:00
|
|
|
return r.contentType
|
|
|
|
}
|
|
|
|
|
2018-04-14 18:21:02 +01:00
|
|
|
func (r *rpcMessage) Topic() string {
|
2015-12-02 20:56:50 +00:00
|
|
|
return r.topic
|
|
|
|
}
|
|
|
|
|
2018-04-14 18:21:02 +01:00
|
|
|
func (r *rpcMessage) Payload() interface{} {
|
|
|
|
return r.payload
|
2015-12-02 20:56:50 +00:00
|
|
|
}
|