Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPExporter ¶
type HTTPExporter struct {
// contains filtered or unexported fields
}
HTTPExporter exports metrics by making an HTTP request.
func NewHTTPExporter ¶
func NewHTTPExporter(endpoint, apiKey string) (*HTTPExporter, error)
NewHTTPExporter creates an HTTPExporter.
type MetricsExporter ¶
MetricsExporter defines the API for exporting metrics.
type MetricsStore ¶
type MetricsStore interface { FetchMetrics(context.Context, bool, int) ([]telemetry.Metric, error) MarkAsPublished(context.Context, []int64) error DeletePublishedOlderThan(context.Context, time.Duration) error }
MetricsStore defines the API for fetching metrics and marking them as published.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher is responsible for fetching unpublished metrics and exporting them.
func NewPublisher ¶
func NewPublisher(s MetricsStore, e MetricsExporter, nodeID string, interval time.Duration) *Publisher
NewPublisher creates a new publisher.
Click to show internal directories.
Click to hide internal directories.