Documentation ¶
Overview ¶
Package remote implements the Prometheus remote write protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuth ¶
type BasicAuth struct {
Username, Password string
}
BasicAuth holds the config for basic authentication.
type HTTPConfig ¶
type HTTPConfig struct { Timeout time.Duration TLSConfig *tls.Config BasicAuth *BasicAuth Headers http.Header }
HTTPConfig holds the config for the HTTP client.
type WriteClient ¶
type WriteClient struct {
// contains filtered or unexported fields
}
WriteClient is a client implementation of the Prometheus remote write protocol. It follows the specs defined by the official design document: https://docs.google.com/document/d/1LPhVRSFkGNSuU1fBd81ulhsCPR4hkSZyyBj1SZ8fWOM
func NewWriteClient ¶
func NewWriteClient(endpoint string, cfg *HTTPConfig) (*WriteClient, error)
NewWriteClient creates a new WriteClient.
func (*WriteClient) Store ¶
func (c *WriteClient) Store(ctx context.Context, series []*prompb.TimeSeries) error
Store sends a batch of samples to the HTTP endpoint, the request is the proto marshaled and encoded.
Click to show internal directories.
Click to hide internal directories.