func DecodeReadRequest(r *http.Request) (*prompb.ReadRequest, error) {
	compressed, err := ioutil.ReadAll(io.LimitReader(r.Body, decodeReadLimit))
	if err != nil {
		return nil, err
	}

	reqBuf, err := snappy.Decode(nil, compressed)
	if err != nil {
		return nil, err
	}

	var req prompb.ReadRequest
	if err := proto.Unmarshal(reqBuf, &req); err != nil {
		return nil, err
	}

	return &req, nil
}
func DecodeReadRequest(r *http.Request) (*prompb.ReadRequest, error) {
	compressed, err := ioutil.ReadAll(io.LimitReader(r.Body, decodeReadLimit))
	if err != nil {
		return nil, err
	}

	reqBuf, err := snappy.Decode(nil, compressed)
	if err != nil {
		return nil, err
	}

	var req prompb.ReadRequest
	if err := proto.Unmarshal(reqBuf, &req); err != nil {
		return nil, err
	}

	return &req, nil
}
func DecodeReadRequest ( r * http . Request ) ( * prompb . ReadRequest , error ) { compressed , err := ioutil . ReadAll ( io . LimitReader ( r . Body , decodeReadLimit ) ) if err != nil { return nil , err } reqBuf , err := snappy . Decode ( nil , compressed ) if err != nil { return nil , err } var req prompb . ReadRequest if err := proto . Unmarshal ( reqBuf , & req ) ; err != nil { return nil , err } return & req , nil }
// DecodeReadRequest reads a remote.Request from a http.Request.
DecodeReadRequest reads a remote . Request from a http . Request .