engine

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

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")
)

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"`
}

Config represents the complete engine configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration

type RedisConfig

type RedisConfig struct {
	URL string `yaml:"url" validate:"required,url"`
}

RedisConfig represents Redis connection configuration

type Service

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

Service encapsulates the worker application logic

func NewService

func NewService(log *logrus.Logger, cfg *Config) (*Service, error)

NewService creates a new worker application

func (*Service) Start

func (a *Service) Start() error

Start initializes and starts the worker application

func (*Service) Stop

func (a *Service) Stop() error

Stop gracefully shuts down the worker application

Jump to

Keyboard shortcuts

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