snuffle

package
v0.93.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg Config) error

Types

type CHQuerier

type CHQuerier struct {
	// contains filtered or unexported fields
}

func (*CHQuerier) Close

func (q *CHQuerier) Close() error

func (*CHQuerier) LabelNames

func (q *CHQuerier) LabelNames(ctx context.Context, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error)

func (*CHQuerier) LabelValues

func (q *CHQuerier) LabelValues(ctx context.Context, name string, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error)

func (*CHQuerier) Select

func (q *CHQuerier) Select(ctx context.Context, sortSeries bool, hints *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet

type CHQueryable

type CHQueryable struct {
	// contains filtered or unexported fields
}

func NewCHQueryable

func NewCHQueryable(client *ClickHouseClient, cfg Config) *CHQueryable

func (*CHQueryable) Querier

func (q *CHQueryable) Querier(mint, maxt int64) (storage.Querier, error)

type ClickHouseClient

type ClickHouseClient struct {
	// contains filtered or unexported fields
}

func NewClickHouseClient

func NewClickHouseClient(cfg Config, metrics ...*bridgeMetrics) *ClickHouseClient

func (*ClickHouseClient) Exec

func (c *ClickHouseClient) Exec(ctx context.Context, sql string) error

func (*ClickHouseClient) InsertColumns

func (c *ClickHouseClient) InsertColumns(ctx context.Context, sql string, appendColumns func(clickHouseBatch) (int, error)) error

func (*ClickHouseClient) InsertColumnsSync

func (c *ClickHouseClient) InsertColumnsSync(ctx context.Context, sql string, appendColumns func(clickHouseBatch) (int, error)) error

func (*ClickHouseClient) Ping

func (c *ClickHouseClient) Ping(ctx context.Context) error

func (*ClickHouseClient) QueryRows

func (c *ClickHouseClient) QueryRows(ctx context.Context, sql string, handle func(clickHouseRow) error) error

func (*ClickHouseClient) QueryRowsWithExternalUInt64s

func (c *ClickHouseClient) QueryRowsWithExternalUInt64s(ctx context.Context, table, column string, values []uint64, sql string, handle func(clickHouseRow) error) error

type Config

type Config struct {
	CHAddr               string
	CHUser               string
	CHPassword           string
	AllowUnauthenticated bool
	CHDatabase           string
	SchemaLayout         string
	SeriesTable          string
	SamplesTable         string
	LabelIndexTable      string
	AttributeTable       string
	MetricNamesTable     string
	// AttributeTableHasMetricName allows filtered label discovery to read the
	// attribute table. The legacy metric_attributes2 table has no metric_name.
	AttributeTableHasMetricName bool
	LabelPostingsTable          string
	ActivityTable               string
	MetricsTable                string
	MetricsInputTable           string
	LogSchemaLayout             string
	LogsTable                   string
	LogStreamsTable             string
	LogStreamLabelsTable        string
	LogAttributesTable          string
	LogStreamStatsTable         string
	HistogramsTable             string
	ExemplarsTable              string
	HTTPHost                    string
	HTTPPort                    string
	TLSEnabled                  bool
	TLSCertFile                 string
	TLSKeyFile                  string
	CHTimeout                   time.Duration
	CHCompression               string
	QueryTimeout                time.Duration
	LookbackDelta               time.Duration
	MaxSamples                  int
	MaxSeries                   int
	IDChunkSize                 int
	AggregateThreads            int
	RangePushdown               bool
	RangeQueryThreads           int
	RangePushdownMaxExpansion   int
	RemoteWriteInterval         time.Duration
	SampleAttributes            bool
	TeamID                      uint64
	DefaultTeamID               uint64
	TeamHeader                  string
	TeamQueryParam              string
	QueryTagsHeader             string
	Pprof                       bool
	PostHogCompactHistograms    bool
	SelfScrapeEnabled           bool
	SelfScrapeInterval          time.Duration
	SelfScrapeTeamID            uint64
	SelfScrapeJob               string
	SelfScrapeInstance          string
	LogRetention                time.Duration
	LogQueryMaxRows             int
	MetricsRetention            time.Duration
}

func ConfigFromEnv

func ConfigFromEnv() Config

type Server

type Server struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL