collector

package
v1.6.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_QUERY_SAMPLE            = "query_sample"
	OP_QUERY_PARSED_TABLE_NAME = "query_parsed_table_name"
)
View Source
const (
	OP_SCHEMA_DETECTION = "schema_detection"
	OP_TABLE_DETECTION  = "table_detection"
	OP_CREATE_STATEMENT = "create_statement"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionInfo

type ConnectionInfo struct {
	DSN        string
	Registry   *prometheus.Registry
	InfoMetric *prometheus.GaugeVec
}

func NewConnectionInfo

func NewConnectionInfo(args ConnectionInfoArguments) (*ConnectionInfo, error)

func (*ConnectionInfo) Start

func (c *ConnectionInfo) Start(ctx context.Context) error

func (*ConnectionInfo) Stop

func (c *ConnectionInfo) Stop()

type ConnectionInfoArguments

type ConnectionInfoArguments struct {
	DSN      string
	Registry *prometheus.Registry
}

type QuerySample

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

func NewQuerySample

func NewQuerySample(args QuerySampleArguments) (*QuerySample, error)

func (*QuerySample) Start

func (c *QuerySample) Start(ctx context.Context) error

func (*QuerySample) Stop

func (c *QuerySample) Stop()

Stop should be kept idempotent

func (*QuerySample) Stopped

func (c *QuerySample) Stopped() bool

type QuerySampleArguments

type QuerySampleArguments struct {
	DB              *sql.DB
	CollectInterval time.Duration
	EntryHandler    loki.EntryHandler

	Logger log.Logger
}

type SchemaTable

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

func NewSchemaTable

func NewSchemaTable(args SchemaTableArguments) (*SchemaTable, error)

func (*SchemaTable) Start

func (c *SchemaTable) Start(ctx context.Context) error

func (*SchemaTable) Stop

func (c *SchemaTable) Stop()

Stop should be kept idempotent

type SchemaTableArguments

type SchemaTableArguments struct {
	DB              *sql.DB
	CollectInterval time.Duration
	EntryHandler    loki.EntryHandler
	CacheTTL        time.Duration

	Logger log.Logger
}

Jump to

Keyboard shortcuts

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