Documentation ¶
Index ¶
- type Blackhole
- type ClickHouse
- func (ch *ClickHouse) Collect(c chan<- prometheus.Metric)
- func (ch *ClickHouse) Describe(c chan<- *prometheus.Desc)
- func (ch *ClickHouse) Read(ctx context.Context, queries []Query) (res *prompb.ReadResponse, err error)
- func (ch *ClickHouse) Write(ctx context.Context, data *prompb.WriteRequest) (err error)
- type MatchType
- type Matcher
- type Matchers
- type Memory
- type Query
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blackhole ¶
type Blackhole struct{}
Blackhole is a non-functional dummy storage for testing.
func NewBlackhole ¶
func NewBlackhole() *Blackhole
func (*Blackhole) Collect ¶
func (m *Blackhole) Collect(c chan<- prometheus.Metric)
func (*Blackhole) Describe ¶
func (m *Blackhole) Describe(c chan<- *prometheus.Desc)
type ClickHouse ¶
type ClickHouse struct {
// contains filtered or unexported fields
}
ClickHouse implements storage interface for the ClickHouse.
func NewClickHouse ¶
func NewClickHouse(dsn string, database string, drop bool) (*ClickHouse, error)
func (*ClickHouse) Collect ¶
func (ch *ClickHouse) Collect(c chan<- prometheus.Metric)
func (*ClickHouse) Describe ¶
func (ch *ClickHouse) Describe(c chan<- *prometheus.Desc)
func (*ClickHouse) Read ¶
func (ch *ClickHouse) Read(ctx context.Context, queries []Query) (res *prompb.ReadResponse, err error)
func (*ClickHouse) Write ¶
func (ch *ClickHouse) Write(ctx context.Context, data *prompb.WriteRequest) (err error)
type Matcher ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a functional dummy storage for testing.
func (*Memory) Collect ¶
func (m *Memory) Collect(c chan<- prometheus.Metric)
func (*Memory) Describe ¶
func (m *Memory) Describe(c chan<- *prometheus.Desc)
type Storage ¶
type Storage interface { // Read runs queries in the storage and returns the same amount of matrixes. // Event if they are empty, they must be present in the returned slice. Read(context.Context, []Query) (*prompb.ReadResponse, error) // Write puts data into storage. Write(context.Context, *prompb.WriteRequest) error prometheus.Collector }
Storage represents generic storage.
Click to show internal directories.
Click to hide internal directories.