Documentation
¶
Overview ¶
Package promremote is a package to write timeseries data to a Prometheus remote write endpoint. copied from https://github.com/m3dbx/prometheus_remote_client_golang/blob/master/promremote/client.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) WriteProto ¶
func (c *Client) WriteProto( ctx context.Context, promWR *prompb.WriteRequest, opts WriteOptions, ) (WriteResult, WriteError)
func (*Client) WriteTimeSeries ¶
func (c *Client) WriteTimeSeries( ctx context.Context, seriesList TSList, opts WriteOptions, ) (WriteResult, WriteError)
type TimeSeries ¶
TimeSeries are made of labels and a datapoint.
func ConvertMetric ¶
func ConvertMetric(metric prometheus.Metric, name string) TimeSeries
type WriteError ¶
WriteError is an error that can also return the HTTP status code if the response is what caused an error.
type WriteOptions ¶
type WriteOptions struct { // Headers to append or override the outgoing headers. Headers map[string]string }
WriteOptions specifies additional write options.
type WriteResult ¶
type WriteResult struct {
StatusCode int
}
WriteResult returns the successful HTTP status code.
Click to show internal directories.
Click to hide internal directories.