Documentation
¶
Index ¶
- func Call(request Request, response interface{}) error
- func CallRemote(address, path string, request Request, response interface{}) error
- type Client
- type Headers
- type Request
- type RpcClient
- func (r *RpcClient) Call(request Request, response interface{}) error
- func (r *RpcClient) CallRemote(address, path string, request Request, response interface{}) error
- func (r *RpcClient) NewJsonRequest(service, method string, request interface{}) *RpcRequest
- func (r *RpcClient) NewProtoRequest(service, method string, request interface{}) *RpcRequest
- func (r *RpcClient) NewRequest(service, method string, request interface{}) *RpcRequest
- type RpcRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallRemote ¶
Types ¶
type Request ¶
type Request interface {
Service() string
Method() string
ContentType() string
Request() interface{}
Headers() Headers
}
func NewJsonRequest ¶
func NewProtoRequest ¶
func NewRequest ¶
type RpcClient ¶
type RpcClient struct{}
func NewRpcClient ¶
func NewRpcClient() *RpcClient
func (*RpcClient) CallRemote ¶
func (*RpcClient) NewJsonRequest ¶
func (r *RpcClient) NewJsonRequest(service, method string, request interface{}) *RpcRequest
func (*RpcClient) NewProtoRequest ¶
func (r *RpcClient) NewProtoRequest(service, method string, request interface{}) *RpcRequest
func (*RpcClient) NewRequest ¶
func (r *RpcClient) NewRequest(service, method string, request interface{}) *RpcRequest
type RpcRequest ¶
type RpcRequest struct {
// contains filtered or unexported fields
}
func NewRpcRequest ¶
func NewRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest
func (*RpcRequest) ContentType ¶
func (r *RpcRequest) ContentType() string
func (*RpcRequest) Headers ¶
func (r *RpcRequest) Headers() Headers
func (*RpcRequest) Method ¶
func (r *RpcRequest) Method() string
func (*RpcRequest) Request ¶
func (r *RpcRequest) Request() interface{}
func (*RpcRequest) Service ¶
func (r *RpcRequest) Service() string
Click to show internal directories.
Click to hide internal directories.