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

rename method to endpoint

This commit is contained in:
Asim Aslam
2019-01-10 21:25:31 +00:00
parent f853f88bcd
commit 9adebfcf1e
21 changed files with 99 additions and 98 deletions

View File

@ -6,14 +6,14 @@ import (
type rpcRequest struct {
service string
method string
endpoint string
contentType string
codec codec.Codec
body interface{}
opts RequestOptions
}
func newRequest(service, method string, request interface{}, contentType string, reqOpts ...RequestOption) Request {
func newRequest(service, endpoint string, request interface{}, contentType string, reqOpts ...RequestOption) Request {
var opts RequestOptions
for _, o := range reqOpts {
@ -27,7 +27,7 @@ func newRequest(service, method string, request interface{}, contentType string,
return &rpcRequest{
service: service,
method: method,
endpoint: endpoint,
body: request,
contentType: contentType,
opts: opts,
@ -42,8 +42,8 @@ func (r *rpcRequest) Service() string {
return r.service
}
func (r *rpcRequest) Method() string {
return r.method
func (r *rpcRequest) Endpoint() string {
return r.endpoint
}
func (r *rpcRequest) Body() interface{} {