From c496f06ca334c7dc1d84db6dc64a2138a4bb5f6b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 23 Jan 2023 22:30:30 -0800 Subject: [PATCH] app/vmagent/{promremotewrite,vmimport}: remove unused functions InsertHandlerForReader() Thanks to 1cfa183c2bba07f914f091967dcd920054b7a12b , where the first such function has been removed --- app/vmagent/promremotewrite/request_handler.go | 8 -------- app/vmagent/vmimport/request_handler.go | 8 -------- 2 files changed, 16 deletions(-) diff --git a/app/vmagent/promremotewrite/request_handler.go b/app/vmagent/promremotewrite/request_handler.go index 4fd0ce0e6..e3e08abe6 100644 --- a/app/vmagent/promremotewrite/request_handler.go +++ b/app/vmagent/promremotewrite/request_handler.go @@ -1,7 +1,6 @@ package promremotewrite import ( - "io" "net/http" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/common" @@ -33,13 +32,6 @@ func InsertHandler(at *auth.Token, req *http.Request) error { }) } -// InsertHandlerForReader processes metrics from given reader -func InsertHandlerForReader(at *auth.Token, r io.Reader) error { - return parser.ParseStream(r, func(tss []prompb.TimeSeries) error { - return insertRows(at, tss, nil) - }) -} - func insertRows(at *auth.Token, timeseries []prompb.TimeSeries, extraLabels []prompbmarshal.Label) error { ctx := common.GetPushCtx() defer common.PutPushCtx(ctx) diff --git a/app/vmagent/vmimport/request_handler.go b/app/vmagent/vmimport/request_handler.go index 781f75753..f0eb010ba 100644 --- a/app/vmagent/vmimport/request_handler.go +++ b/app/vmagent/vmimport/request_handler.go @@ -1,7 +1,6 @@ package vmimport import ( - "io" "net/http" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmagent/common" @@ -36,13 +35,6 @@ func InsertHandler(at *auth.Token, req *http.Request) error { }) } -// InsertHandlerForReader processes metrics from given reader -func InsertHandlerForReader(r io.Reader, isGzipped bool) error { - return parser.ParseStream(r, isGzipped, func(rows []parser.Row) error { - return insertRows(nil, rows, nil) - }) -} - func insertRows(at *auth.Token, rows []parser.Row, extraLabels []prompbmarshal.Label) error { ctx := common.GetPushCtx() defer common.PutPushCtx(ctx)