Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadRequest = errors.New("bad request")
ErrBadRequest represents bad request error.
Functions ¶
Types ¶
type Config ¶
type Config struct { // VictoriaMetrics address to perform import requests // --httpListenAddr value for single node version // --httpListenAddr value of vmselect component for cluster version Addr string // Concurrency defines number of worker // performing the import requests concurrently Concurrency uint8 // Whether to apply gzip compression Compress bool // AccountID for cluster version. // Empty value assumes it is a single node version AccountID string // BatchSize defines how many samples // importer collects before sending the import request BatchSize int // User name for basic auth User string // Password for basic auth Password string // SignificantFigures defines the number of significant figures to leave // in metric values before importing. // Zero value saves all the significant decimal places SignificantFigures int // RoundDigits defines the number of decimal digits after the point that must be left // in metric values before importing. RoundDigits int // ExtraLabels that will be added to all imported series. Must be in label=value format. ExtraLabels []string // RateLimit defines a data transfer speed in bytes per second. // Is applied to each worker (see Concurrency) independently. RateLimit int64 }
Config contains list of params to configure the Importer
type ImportError ¶
type ImportError struct { // The batch of timeseries processed by importer at the moment Batch []*TimeSeries // The error that appeared during insert // If err is nil - no error happened and Batch // Is the latest delivered Batch. Err error }
ImportError is type of error generated in case of unsuccessful import request
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
Importer performs insertion of timeseries via VictoriaMetrics import protocol see https://docs.victoriametrics.com/#how-to-import-time-series-data
func NewImporter ¶
NewImporter creates new Importer for the given cfg.
func (*Importer) Close ¶
func (im *Importer) Close()
Close sends signal to all goroutines to exit and waits until they are finished
func (*Importer) Errors ¶
func (im *Importer) Errors() chan *ImportError
Errors returns a channel for receiving import errors if any
func (*Importer) Import ¶
func (im *Importer) Import(tsBatch []*TimeSeries) error
Import imports tsBatch.
func (*Importer) Input ¶
func (im *Importer) Input() chan<- *TimeSeries
Input returns a channel for sending timeseries that need to be imported
type TimeSeries ¶
TimeSeries represents a time series.
Click to show internal directories.
Click to hide internal directories.