engine

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: GPL-3.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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