Documentation ¶
Index ¶
- Constants
- func GetDailyUsageFromProm(ctx context.Context, api promv1.API, query string, start, end time.Time, ...) ([]*mgmtv1alpha1.DayResult, float64, error)
- func GetPromQueryFromMetric(metric mgmtv1alpha1.RangedMetricName, labels MetricLabels, timeWindow string) (string, error)
- func GetTotalUsageFromProm(ctx context.Context, api promv1.API, query string, dayEnd time.Time, ...) (float64, error)
- type MetricLabel
- type MetricLabels
Constants ¶
View Source
const ( AccountIdLabel = "neosyncAccountId" JobIdLabel = "neosyncJobId" TemporalWorkflowId = "temporalWorkflowId" TemporalRunId = "temporalRunId" TableSchemaLabel = "tableSchema" TableNameLabel = "tableName" JobTypeLabel = "jobType" IsUpdateConfigLabel = "isUpdateConfig" NeosyncDateLabel = "date" NeosyncDateFormat = "2006-01-02" TemporalWorkflowIdEnvKey = "TEMPORAL_WORKFLOW_ID" TemporalRunIdEnvKey = "TEMPORAL_ENV_ID" NeosyncDateEnvKey = "NEOSYNC_DATE" )
Variables ¶
This section is empty.
Functions ¶
func GetDailyUsageFromProm ¶ added in v0.4.65
func GetPromQueryFromMetric ¶ added in v0.4.65
func GetPromQueryFromMetric( metric mgmtv1alpha1.RangedMetricName, labels MetricLabels, timeWindow string, ) (string, error)
Types ¶
type MetricLabel ¶
func NewEqLabel ¶
func NewEqLabel(key, value string) MetricLabel
func NewNotEqLabel ¶
func NewNotEqLabel(key, value string) MetricLabel
note: this has only been tested with prometheus and using it with benthos is not currently supported
func (*MetricLabel) ToBenthosMeta ¶
func (m *MetricLabel) ToBenthosMeta() string
func (*MetricLabel) ToPromQueryString ¶
func (m *MetricLabel) ToPromQueryString() string
type MetricLabels ¶
type MetricLabels []MetricLabel
func (MetricLabels) ToBenthosMeta ¶
func (m MetricLabels) ToBenthosMeta() string
func (MetricLabels) ToPromQueryString ¶
func (m MetricLabels) ToPromQueryString() string
Click to show internal directories.
Click to hide internal directories.