tenantmapping

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapTenantTarget

func MapTenantTarget(ctx context.Context, tx *sqlx.Tx, prom report.PromQuerier, at time.Time, options ...Option) error

MapTenantTarget maps the tenants (source, target) for a given time, read from a control-api prometheus metric. Truncates the time to the current hour.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option represents a report option.

func WithMetricSelector

func WithMetricSelector(q string) Option

WithMetricSelector allows further specifying which metrics to choose. Example: WithMetricSelector(`namespace="testing"`)

func WithPrometheusQueryTimeout

func WithPrometheusQueryTimeout(tm time.Duration) Option

WithPrometheusQueryTimeout allows setting a timout when querying prometheus.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL