mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
s/EncodReadResponse/EncodeReadResponse/
This commit is contained in:
parent
febed48703
commit
758d64ffd9
|
@ -45,8 +45,8 @@ func DecodeReadRequest(r *http.Request) (*ReadRequest, error) {
|
||||||
return &req, nil
|
return &req, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EncodReadResponse writes a remote.Response to a http.ResponseWriter.
|
// EncodeReadResponse writes a remote.Response to a http.ResponseWriter.
|
||||||
func EncodReadResponse(resp *ReadResponse, w http.ResponseWriter) error {
|
func EncodeReadResponse(resp *ReadResponse, w http.ResponseWriter) error {
|
||||||
data, err := proto.Marshal(resp)
|
data, err := proto.Marshal(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -489,7 +489,7 @@ func (api *API) remoteRead(w http.ResponseWriter, r *http.Request) {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := remote.EncodReadResponse(&resp, w); err != nil {
|
if err := remote.EncodeReadResponse(&resp, w); err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue