source

package
v1.8.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticsearchMetricsClient

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

func NewElasticsearchMetricsClient

func NewElasticsearchMetricsClient(address string, conf map[string]string) (*ElasticsearchMetricsClient, error)

func (*ElasticsearchMetricsClient) NodeMetricsAvg

func (e *ElasticsearchMetricsClient) NodeMetricsAvg(ctx context.Context, nodeName string, period string) (*NodeMetrics, error)

type MetricsClient

type MetricsClient interface {
	NodeMetricsAvg(ctx context.Context, nodeName string, period string) (*NodeMetrics, error)
}

func NewMetricsClient

func NewMetricsClient(metricsConf map[string]string) (MetricsClient, error)

type NodeMetrics

type NodeMetrics struct {
	CPU    float64
	Memory float64
}

type PrometheusMetricsClient

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

func NewPrometheusMetricsClient

func NewPrometheusMetricsClient(address string, conf map[string]string) (*PrometheusMetricsClient, error)

func (*PrometheusMetricsClient) NodeMetricsAvg

func (p *PrometheusMetricsClient) NodeMetricsAvg(ctx context.Context, nodeName string, period string) (*NodeMetrics, error)

Jump to

Keyboard shortcuts

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