mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
Send Request and Publication types
This commit is contained in:
47
server/rpc_request.go
Normal file
47
server/rpc_request.go
Normal file
@ -0,0 +1,47 @@
|
||||
package server
|
||||
|
||||
type rpcRequest struct {
|
||||
service string
|
||||
method string
|
||||
contentType string
|
||||
request interface{}
|
||||
stream bool
|
||||
}
|
||||
|
||||
type rpcPublication struct {
|
||||
topic string
|
||||
contentType string
|
||||
message interface{}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
func (r *rpcPublication) ContentType() string {
|
||||
return r.contentType
|
||||
}
|
||||
|
||||
func (r *rpcPublication) Topic() string {
|
||||
return r.topic
|
||||
}
|
||||
|
||||
func (r *rpcPublication) Message() interface{} {
|
||||
return r.message
|
||||
}
|
Reference in New Issue
Block a user