Documentation
¶
Index ¶
- func MetricsFetchBatch(ctx context.Context, ctr *app.Container, conf MetricsBatchConfig, ...) error
- type BatchConfigWithRawMetrics
- type MetricsBatchConfig
- type MetricsBatchRawConfig
- type MetricsBatchRequestConfig
- type MetricsBatchRequestDataConfig
- type MetricsFetcher
- type MetricsFetcherFactory
- type MetricsThreadExecutor
- type MetricsType
- type MetricsWriter
- type PrometheusMetricsBatchRequestConfig
- type PrometheusMetricsFetcher
- type TermType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchConfigWithRawMetrics ¶
type BatchConfigWithRawMetrics struct {
Metrics MetricsBatchRawConfig `yaml:"metrics"`
}
type MetricsBatchConfig ¶
type MetricsBatchConfig struct {
Enabled bool `yaml:"enabled"`
Requests []MetricsBatchRequestConfig `yaml:"requests"`
}
type MetricsBatchRawConfig ¶
type MetricsBatchRequestConfig ¶
type MetricsBatchRequestConfig struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
Data []MetricsBatchRequestDataConfig `yaml:"data"`
}
type MetricsFetcher ¶
type MetricsFetcherFactory ¶
type MetricsFetcherFactory interface {
Init(conf []byte) error
FetcherFactory(ctx context.Context, ctr *app.Container) (MetricsFetcher, error)
}
func GetMetricsFetcherFactory ¶
func GetMetricsFetcherFactory(t MetricsType) MetricsFetcherFactory
type MetricsThreadExecutor ¶
type MetricsThreadExecutor struct {
// contains filtered or unexported fields
}
type MetricsType ¶
type MetricsType string
const (
MetricsTypePrometheus MetricsType = "prometheus"
)
func NewMetricsTypeFromStr ¶
func NewMetricsTypeFromStr(s string) MetricsType
type MetricsWriter ¶
type PrometheusMetricsBatchRequestConfig ¶
type PrometheusMetricsBatchRequestConfig struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
URL string `yaml:"url"`
Query string `yaml:"query"`
Interval string `yaml:"interval"`
Data []MetricsBatchRequestDataConfig `yaml:"data"`
}
func (*PrometheusMetricsBatchRequestConfig) FetcherFactory ¶
func (p *PrometheusMetricsBatchRequestConfig) FetcherFactory(ctx context.Context, ctr *app.Container) (MetricsFetcher, error)
func (*PrometheusMetricsBatchRequestConfig) Init ¶
func (p *PrometheusMetricsBatchRequestConfig) Init(conf []byte) error
type PrometheusMetricsFetcher ¶
type PrometheusMetricsFetcher struct {
// contains filtered or unexported fields
}
func (PrometheusMetricsFetcher) CreateRequest ¶
func (*PrometheusMetricsFetcher) Fetch ¶
func (p *PrometheusMetricsFetcher) Fetch( ctx context.Context, ctr *app.Container, writer MetricsWriter, ) (<-chan TermType, error)
Click to show internal directories.
Click to hide internal directories.