1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Dont expose rpc client/server

This commit is contained in:
Asim
2015-05-23 17:40:53 +01:00
parent 3d8dd6e121
commit e192f335da
8 changed files with 73 additions and 83 deletions

View File

@ -1,14 +1,14 @@
package client
type RpcRequest struct {
type rpcRequest struct {
service string
method string
contentType string
request interface{}
}
func newRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest {
return &RpcRequest{
func newRpcRequest(service, method string, request interface{}, contentType string) Request {
return &rpcRequest{
service: service,
method: method,
request: request,
@ -16,22 +16,18 @@ func newRpcRequest(service, method string, request interface{}, contentType stri
}
}
func (r *RpcRequest) ContentType() string {
func (r *rpcRequest) ContentType() string {
return r.contentType
}
func (r *RpcRequest) Service() string {
func (r *rpcRequest) Service() string {
return r.service
}
func (r *RpcRequest) Method() string {
func (r *rpcRequest) Method() string {
return r.method
}
func (r *RpcRequest) Request() interface{} {
func (r *rpcRequest) Request() interface{} {
return r.request
}
func NewRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest {
return newRpcRequest(service, method, request, contentType)
}