mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-06-09 03:43:58 +03:00
This allows to unify the search limit logic and flags across the two branches. - The vmcluster version of this PR can be found here: https://github.com/VictoriaMetrics/VictoriaMetrics/pull/11042 - This PR fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10969 --------- Signed-off-by: Artem Fetishev <rtm@victoriametrics.com>
31 lines
679 B
Go
31 lines
679 B
Go
package vminsertapi
|
|
|
|
import (
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage/metricsmetadata"
|
|
)
|
|
|
|
// RPCCall defines rpc call from vminsert to vmstorage
|
|
type RPCCall struct {
|
|
Name string
|
|
VersionedName string
|
|
}
|
|
|
|
var (
|
|
MetricRowsRpcCall = RPCCall{
|
|
Name: "metric_rows",
|
|
VersionedName: "writeRows_v1",
|
|
}
|
|
MetricMetadataRpcCall = RPCCall{
|
|
Name: "metricmetadata_rows",
|
|
VersionedName: "writeMetadata_v1",
|
|
}
|
|
)
|
|
|
|
// API must implement vminsert API.
|
|
type API interface {
|
|
WriteRows(rows []storage.MetricRow) error
|
|
WriteMetadata(mrs []metricsmetadata.Row) error
|
|
IsReadOnly() bool
|
|
}
|