queryactionsimpl

package
v0.0.0-...-487e2cc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package queryactionsimpl implements the Data Observability query actions component

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomSQLSelectFields

type CustomSQLSelectFields struct {
	MetricConfigID int64  `json:"metric_config_id"`
	EntityID       string `json:"entity_id"`
}

CustomSQLSelectFields identifies the metric config and entity for custom SQL queries, since custom SQL cannot encode identity in the column name.

type DBIdentifier

type DBIdentifier struct {
	Type          string `json:"type"`
	Host          string `json:"host"`
	AgentHostname string `json:"agent_hostname"`
}

DBIdentifier identifies a database cluster to target. Type describes the hosting kind (e.g. "self-hosted", "rds"). Instance matching is by host only; per-query dbname fields handle database routing.

type DOQueryPayload

type DOQueryPayload struct {
	ConfigID     string       `json:"config_id"`
	DBIdentifier DBIdentifier `json:"db_identifier"`
	Queries      []QuerySpec  `json:"queries"`
}

DOQueryPayload represents the RC config payload for a database cluster. Each config groups all active monitor queries for a single host, with per-query dbname routing.

type EntityMetadata

type EntityMetadata struct {
	Platform string `json:"platform,omitempty"`
	Account  string `json:"account,omitempty"`
	Database string `json:"database,omitempty"`
	Schema   string `json:"schema,omitempty"`
	Table    string `json:"table,omitempty"`
}

EntityMetadata describes the data asset a query targets (for lineage/tagging).

type Provides

type Provides struct {
	Comp doqueryactions.Component
}

Provides defines the output of the Data Observability query actions component

func NewComponent

func NewComponent(reqs Requires) (Provides, error)

NewComponent creates a new Data Observability query actions component

type QuerySpec

type QuerySpec struct {
	DBName                string                 `json:"dbname,omitempty"`
	MonitorID             int64                  `json:"monitor_id,omitempty"`
	Type                  string                 `json:"type"`
	Query                 string                 `json:"query"`
	IntervalSeconds       int                    `json:"interval_seconds"`
	Schedule              string                 `json:"schedule,omitempty"`
	TimeoutSeconds        int                    `json:"timeout_seconds"`
	Entity                EntityMetadata         `json:"entity"`
	CustomSQLSelectFields *CustomSQLSelectFields `json:"custom_sql_select_fields,omitempty"`
}

QuerySpec defines a single monitor query to schedule.

type Requires

type Requires struct {
	Lc       compdef.Lifecycle
	Log      log.Component
	RcClient rcclient.Component
	Ac       autodiscovery.Component
}

Requires defines the dependencies for the Data Observability query actions component

Jump to

Keyboard shortcuts

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