1
0
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:
Asim
2015-12-02 20:56:50 +00:00
parent 4b18b779aa
commit a695e10d21
7 changed files with 103 additions and 21 deletions

47
server/rpc_request.go Normal file
View 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
}