probe

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Subscriptions   []string
	ResourceType    string
	Query           string
	MetricNamespace string
	MetricNames     []string
	MetricPrefix    string

	QueryCacheCacheExpiration time.Duration

	azmetrics.QueryResourcesOptions
}

func GetConfigFromRequest

func GetConfigFromRequest(request *http.Request) (*Config, error)

type Probe

type Probe struct {
	// contains filtered or unexported fields
}

func New

func New(
	logger log.Logger,
	httpClient *http.Client,
	cred azcore.TokenCredential,
	subscriptions []string,
	queryCache *cache.Cache[Resources],
	metricsClientCache *cache.Cache[azmetrics.Client],
) (*Probe, error)

func (*Probe) ServeHTTP added in v0.1.0

func (p *Probe) ServeHTTP(reg prometheus.Registerer) http.HandlerFunc

type Request added in v0.1.0

type Request struct {
	http.Request
	log.Logger
	// contains filtered or unexported fields
}

func (*Request) Collect added in v0.1.0

func (r *Request) Collect(ch chan<- prometheus.Metric)

func (*Request) Describe added in v0.1.0

func (r *Request) Describe(_ chan<- *prometheus.Desc)

type Resources

type Resources struct {
	Resources        map[string]map[string][]string
	AdditionalLabels map[string]map[string]string
}

Jump to

Keyboard shortcuts

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