Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
Name string `json:"name"`
Tags map[string]string `json:"tags"`
Fields map[string]interface{} `json:"fields"`
Timestamp time.Time `json:"timestamp"`
Type dto.MetricType `json:"type"`
}
Metrics is the default influx based metrics.
type MetricsCollection ¶
type MetricsCollection struct {
OrgID platform.ID `json:"orgID"`
BucketID platform.ID `json:"bucketID"`
MetricsSlice MetricsSlice `json:"metrics"`
}
MetricsCollection is the struct including metrics and other requirements.
type MetricsSlice ¶
type MetricsSlice []Metrics
MetricsSlice is a slice of Metrics
type Scheduler ¶
type Scheduler struct {
Targets influxdb.ScraperTargetStoreService
// Interval is between each metrics gathering event.
Interval time.Duration
// contains filtered or unexported fields
}
Scheduler is struct to run scrape jobs.
func NewScheduler ¶
func NewScheduler( log *zap.Logger, scrapeQueueLength int, scrapesInProgress int, targets influxdb.ScraperTargetStoreService, writer storage.PointsWriter, interval time.Duration, ) (*Scheduler, error)
NewScheduler creates a new Scheduler and subscriptions for scraper jobs.
type Scraper ¶
type Scraper interface {
Gather(ctx context.Context, target influxdb.ScraperTarget) (collected MetricsCollection, err error)
}
Scraper gathers metrics from a scraper target.
Click to show internal directories.
Click to hide internal directories.