Documentation
¶
Overview ¶
Package engine provides the core CBT engine service
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRedisURLRequired is returned when Redis URL is not provided ErrRedisURLRequired = errors.New("redis URL is required") // ErrIntervalTypeEmpty is returned when an interval type has no transformations ErrIntervalTypeEmpty = errors.New("interval type must have at least one transformation") // ErrTransformationNameRequired is returned when a transformation has no name ErrTransformationNameRequired = errors.New("transformation name is required") // ErrInvalidTransformationFormat is returned when a transformation has an invalid format ErrInvalidTransformationFormat = errors.New("invalid transformation format") // ErrFrontendAddrRequired is returned when frontend is enabled but no address is configured ErrFrontendAddrRequired = errors.New("frontend address is required when frontend is enabled") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Core settings
Logging string `yaml:"logging" default:"info" validate:"oneof=panic fatal warn info debug trace"`
MetricsAddr string `yaml:"metricsAddr" default:":9091"`
HealthCheckAddr string `yaml:"healthCheckAddr"`
PProfAddr string `yaml:"pprofAddr"`
// Dependencies
ClickHouse clickhouse.Config `yaml:"clickhouse"`
Redis RedisConfig `yaml:"redis"`
// Coordinator specific
Scheduler scheduler.Config `yaml:"scheduler"`
// Worker specific settings
Worker worker.Config `yaml:"worker"`
// Models configuration
Models models.Config `yaml:"models"`
// Frontend service configuration (includes API)
Frontend FrontendConfig `yaml:"frontend"`
// Management API configuration
Management management.Config `yaml:"management"`
// Interval type transformations for API exposure
IntervalTypes IntervalTypesConfig `yaml:"interval_types"`
}
Config represents the complete engine configuration
type FrontendConfig ¶ added in v0.0.30
type FrontendConfig struct {
Enabled bool `yaml:"enabled" default:"false"`
Addr string `yaml:"addr" default:":8080" validate:"hostname_port"`
}
FrontendConfig represents frontend and API service configuration
func (*FrontendConfig) Validate ¶ added in v0.0.30
func (c *FrontendConfig) Validate() error
Validate validates the frontend configuration
type IntervalTypeTransformation ¶ added in v0.0.25
type IntervalTypeTransformation struct {
Name string `yaml:"name" json:"name"` // Display name (e.g., "timestamp", "epoch")
Expression string `yaml:"expression,omitempty" json:"expression,omitempty"` // Optional CEL expression (e.g., "math.floor(value / 12)")
Format string `yaml:"format,omitempty" json:"format,omitempty"` // Optional display format hint (e.g., "datetime", "date", "time")
}
IntervalTypeTransformation represents a single transformation step for an interval type
type IntervalTypesConfig ¶ added in v0.0.25
type IntervalTypesConfig map[string][]IntervalTypeTransformation
IntervalTypesConfig maps interval type names to their transformation pipelines
func (IntervalTypesConfig) Validate ¶ added in v0.0.25
func (c IntervalTypesConfig) Validate() error
Validate validates the interval types configuration
type RedisConfig ¶
type RedisConfig struct {
URL string `yaml:"url" validate:"required,url"`
}
RedisConfig represents Redis connection configuration
Click to show internal directories.
Click to hide internal directories.