Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSecretFlags ¶ added in v1.79.3
func InitSecretFlags()
InitSecretFlags must be called after flag.Parse and before any logging
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an asynchronous HTTP client for writing timeseries via remote write protocol.
func Init ¶ added in v1.37.4
Init creates Client object from given flags. Returns nil if addr flag wasn't set.
func NewClient ¶
NewClient returns asynchronous client for writing timeseries via remotewrite protocol.
func (*Client) Push ¶
func (c *Client) Push(s prompbmarshal.TimeSeries) error
Push adds timeseries into queue for writing into remote storage. Push returns and error if client is stopped or if queue is full.
type Config ¶
type Config struct { // Addr of remote storage Addr string AuthCfg *promauth.Config // Concurrency defines number of readers that // concurrently read from the queue and flush data Concurrency int // MaxBatchSize defines max number of timeseries // to be flushed at once MaxBatchSize int // MaxQueueSize defines max length of input queue // populated by Push method. // Push will be rejected once queue is full. MaxQueueSize int // FlushInterval defines time interval for flushing batches FlushInterval time.Duration // WriteTimeout defines timeout for HTTP write request // to remote storage WriteTimeout time.Duration // Transport will be used by the underlying http.Client Transport *http.Transport // DisablePathAppend can be used to not automatically append '/api/v1/write' to the remote write url DisablePathAppend bool }
Config is config for remote write.
Click to show internal directories.
Click to hide internal directories.