Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Close(context.Context) (err error)
- func (c *Client) Instant(initialCtx context.Context, query string, when time.Time, step time.Duration) (data []Instant, err error)
- func (c *Client) Ping(initialCtx context.Context) (err error)
- func (c *Client) Push(initialCtx context.Context, set *metrics.Set) error
- func (c *Client) PushCounter(ctx context.Context, name string, value uint64) error
- func (c *Client) PushGauge(ctx context.Context, name string, value float64) error
- func (c *Client) Range(initialCtx context.Context, query string, start, end time.Time, ...) (data []Range, err error)
- type Config
- type Err
- type Instant
- type Range
- type Result
Constants ¶
View Source
const DefaultEndpoint = "http://127.0.0.1:8428"
View Source
const DefaultPushEndpoint = "/api/v1/import/prometheus"
View Source
const DefaultStep = 5 * time.Minute
View Source
const LabelForName = "__name__"
Variables ¶
View Source
var ( // ErrUnexpectedResponse happens, when Victoria Metrics gives unexpected response ErrUnexpectedResponse = errors.New("unexpected response") // ErrQueryError happens, when Victoria Metrics cannot process query ErrQueryError = errors.New("query error") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Instant ¶
func (c *Client) Instant(initialCtx context.Context, query string, when time.Time, step time.Duration) (data []Instant, err error)
Instant makes instant query described here https://docs.victoriametrics.com/victoriametrics/keyconcepts/#instant-query
func (*Client) PushCounter ¶
PushCounter pushes counter
type Config ¶
type Config struct {
Address string
Headers map[string]string
ExtraLabels string
HttpClient *http.Client
Insecure bool
}
Config defines connection parameters
Source Files
¶
Click to show internal directories.
Click to hide internal directories.