mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
Rework use of context
This commit is contained in:
@ -1,13 +1,10 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type RpcRequest struct {
|
||||
service, method, contentType string
|
||||
request interface{}
|
||||
headers http.Header
|
||||
service string
|
||||
method string
|
||||
contentType string
|
||||
request interface{}
|
||||
}
|
||||
|
||||
func newRpcRequest(service, method string, request interface{}, contentType string) *RpcRequest {
|
||||
@ -16,7 +13,6 @@ func newRpcRequest(service, method string, request interface{}, contentType stri
|
||||
method: method,
|
||||
request: request,
|
||||
contentType: contentType,
|
||||
headers: make(http.Header),
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,10 +20,6 @@ func (r *RpcRequest) ContentType() string {
|
||||
return r.contentType
|
||||
}
|
||||
|
||||
func (r *RpcRequest) Headers() Headers {
|
||||
return r.headers
|
||||
}
|
||||
|
||||
func (r *RpcRequest) Service() string {
|
||||
return r.service
|
||||
}
|
||||
|
Reference in New Issue
Block a user