datasource

package
v0.53.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProxyKindField = "kind"
	ProxySpec      = "spec"
)

Variables

This section is empty.

Functions

func ValidateAndExtract added in v0.52.0

func ValidateAndExtract(pluginSpec any) (any, string, error)

ValidateAndExtract finds a proxy in the pluginSpec It then unmarshals the corresponding 'spec' field into the config interace{}.

Types

type Postgres added in v0.52.0

type Postgres struct {
	DirectURL      string           `json:"directUrl,omitempty" yaml:"directUrl,omitempty"`
	Proxy          *sql.Proxy       `json:"proxy,omitempty" yaml:"proxy,omitempty"`
	ScrapeInterval *common.Duration `json:"scrapeInterval,omitempty" yaml:"scrapeInterval,omitempty"`
}

Postgres is only used for testing purpose. It doesn't reflect the nature of an actual Postgres datasource

type Prometheus

type Prometheus struct {
	DirectURL      *url.URL         `json:"directUrl,omitempty" yaml:"directUrl,omitempty"`
	Proxy          *http.Proxy      `json:"proxy,omitempty" yaml:"proxy,omitempty"`
	ScrapeInterval *common.Duration `json:"scrapeInterval,omitempty" yaml:"scrapeInterval,omitempty"`
}

Prometheus is only used for testing purpose. It doesn't reflect the nature of the actual prometheus datasource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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