Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDroppedRows ¶ added in v1.97.7
func GetDroppedRows() int
GetDroppedRows returns value of droppedRows metric
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.
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
// Transport will be used by the underlying http.Client
Transport *http.Transport
}
Config is config for remote write client.
type DebugClient ¶ added in v1.92.0
type DebugClient struct {
// contains filtered or unexported fields
}
DebugClient won't push series periodically, but will write data to remote endpoint immediately when Push() is called
func NewDebugClient ¶ added in v1.92.0
func NewDebugClient() (*DebugClient, error)
NewDebugClient initiates and returns a new DebugClient
func (*DebugClient) Close ¶ added in v1.92.0
func (c *DebugClient) Close() error
Close stops the DebugClient
func (*DebugClient) Push ¶ added in v1.92.0
func (c *DebugClient) Push(s prompb.TimeSeries) error
Push sends the given timeseries to the remote storage.
type RWClient ¶ added in v1.92.0
type RWClient interface {
// Push pushes the give time series to remote storage
Push(s prompb.TimeSeries) error
// Close stops the client. Client can't be reused after Close call.
Close() error
}
RWClient represents an HTTP client for pushing data via remote write protocol