mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-07-27 02:52:59 +03:00
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
|
||
|
|
}
|