1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-11 17:18:28 +02:00
go-micro/client/rpc_request.go
2015-05-23 11:53:40 +01:00

38 lines
769 B
Go

package client
type RpcRequest struct {
service string
method string
contentType string
request interface{}
}
func newRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest {
return &RpcRequest{
service: service,
method: method,
request: request,
contentType: contentType,
}
}
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 NewRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest {
return newRpcRequest(service, method, request, contentType)
}