client

package
v0.0.0-...-78e17b3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAPIClients

func InitAPIClients(rawcfg interface{}) error

func RegisterAPIInstance

func RegisterAPIInstance(id string, url string) error

Types

type PrometheusV1APIClient

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

func GetAPIInstance

func GetAPIInstance(id string) *PrometheusV1APIClient

func NewPrometheusV1APIClient

func NewPrometheusV1APIClient(url string) (*PrometheusV1APIClient, error)

func (*PrometheusV1APIClient) GetStaticLabelValues

func (c *PrometheusV1APIClient) GetStaticLabelValues(query string, target_label string) ([]string, error)

e.g. if you have a metric like up{hostname="my_vps_id", region="US", location="LA"} 1 you can get region value or location value of certain hostname from here also you can get all the hostname here

func (*PrometheusV1APIClient) Query

func (c *PrometheusV1APIClient) Query(query string) (model.Value, v1.Warnings, error)

Jump to

Keyboard shortcuts

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