Documentation ¶
Index ¶
Constants ¶
View Source
const ScrapePrometheusKind = "scrapePrometheus"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶
type Metric struct { Field string // Prometheus metric name Tags map[string]string // key is tag name; val is tag value TypeVal map[string]interface{} // key is metric type; val is metric value Timestamp time.Time Type string // Prometheus metric type }
Metric stores the fields that we need to construct Table
type PrometheusIterator ¶
type PrometheusIterator struct { NowFn func() time.Time // Convert times // contains filtered or unexported fields }
func (*PrometheusIterator) Close ¶
func (p *PrometheusIterator) Close() error
func (*PrometheusIterator) Connect ¶
func (p *PrometheusIterator) Connect(ctx context.Context) error
This implementation of Connect takes in a user defined url, validates the url and gets an http response. It then calls parse to parse the body into a list Metrics or returns and error if not given a valid prometheus metric endpoint.
type ScrapePrometheusOpSpec ¶
type ScrapePrometheusOpSpec struct {
URL string `json:"token,omitempty"`
}
func (*ScrapePrometheusOpSpec) Kind ¶
func (s *ScrapePrometheusOpSpec) Kind() flux.OperationKind
type ScrapePrometheusProcedureSpec ¶
type ScrapePrometheusProcedureSpec struct { plan.DefaultCost URL string }
func (*ScrapePrometheusProcedureSpec) Copy ¶
func (s *ScrapePrometheusProcedureSpec) Copy() plan.ProcedureSpec
func (*ScrapePrometheusProcedureSpec) Kind ¶
func (s *ScrapePrometheusProcedureSpec) Kind() plan.ProcedureKind
Click to show internal directories.
Click to hide internal directories.