all: rename ParseStream -> stream.Parse

This is a follow-up for 057698f7fb
This commit is contained in:
Aliaksandr Valialkin 2023-02-13 10:51:55 -08:00
parent f987fb9c8b
commit 9fd003d54a
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ type client struct {
// hc is the default client optimized for common case of scraping targets with moderate number of metrics. // hc is the default client optimized for common case of scraping targets with moderate number of metrics.
hc *fasthttp.HostClient hc *fasthttp.HostClient
// sc (aka `stream client`) is used instead of hc if ScrapeWork.ParseStream is set. // sc (aka `stream client`) is used instead of hc if ScrapeWork.StreamParse is set.
// It may be useful for scraping targets with millions of metrics per target. // It may be useful for scraping targets with millions of metrics per target.
sc *http.Client sc *http.Client

View File

@ -13,7 +13,7 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/prometheus" "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/prometheus"
) )
func TestParseStream(t *testing.T) { func TestParse(t *testing.T) {
common.StartUnmarshalWorkers() common.StartUnmarshalWorkers()
defer common.StopUnmarshalWorkers() defer common.StopUnmarshalWorkers()

View File

@ -32,7 +32,7 @@ func Parse(r io.Reader, callback func(tss []prompb.TimeSeries) error) error {
return err return err
} }
// Synchronously process the request in order to properly return errors to ParseStream caller, // Synchronously process the request in order to properly return errors to Parse caller,
// so it could properly return HTTP 503 status code in response. // so it could properly return HTTP 503 status code in response.
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/896 // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/896
bb := bodyBufferPool.Get() bb := bodyBufferPool.Get()