Documentation ¶
Index ¶
- func ParseIsolationLevel(level string) sql.IsolationLevel
- type Client
- func (c Client) Name() string
- func (c *Client) PrepareStmt(rawStmt string) (*sql.Tx, *sql.Stmt, error)
- func (c Client) UpdateStats()
- func (c *Client) Write(metrics metric.Metrics, samples model.Samples) error
- func (c *Client) WriteLabel(m *model.Metric, stmt *sql.Stmt, t time.Time) (written bool, err error)
- func (c *Client) WriteLabels(metrics metric.Metrics) error
- func (c *Client) WriteSample(s *model.Sample, txn *sql.Tx, stmt *sql.Stmt) (written bool, err error)
- func (c *Client) WriteSamples(samples model.Samples) error
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseIsolationLevel ¶ added in v0.3.3
func ParseIsolationLevel(level string) sql.IsolationLevel
ParseIsolationLevel converts a string level back to int
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows sending batches of Prometheus samples to Postgres.
func NewClient ¶
func NewClient(logger log.Logger, config ClientConfig) *Client
NewClient creates a new Client.
func (*Client) PrepareStmt ¶ added in v0.3.2
PrepareStmt within a transaction using the configured isolation level
func (Client) UpdateStats ¶
func (c Client) UpdateStats()
UpdateStats pings the server and updates connection metrics
func (*Client) WriteLabel ¶ added in v0.3.3
WriteLabel using a prepared statement and last seen time
func (*Client) WriteLabels ¶
WriteLabels from a batch write
Click to show internal directories.
Click to hide internal directories.