metrics server added
Some checks failed
/ Make image (push) Failing after 31s

This commit is contained in:
nquidox 2026-04-24 12:57:00 +03:00
parent 7c45234c95
commit 270cc77d31
4 changed files with 104 additions and 4 deletions

View file

@ -3,8 +3,9 @@ package config
import "runtime"
type Config struct {
App AppConfig
Rabbit RabbitMQConfig
App AppConfig
Rabbit RabbitMQConfig
Metrics MetricsConfig
}
type AppConfig struct {
@ -27,6 +28,12 @@ type RabbitMQConfig struct {
TaskResultQueue string
}
type MetricsConfig struct {
Host string
Port string
GinMode string
}
func New() *Config {
return &Config{
App: AppConfig{
@ -48,5 +55,11 @@ func New() *Config {
TaskSourceQueue: getEnv("TASK_SOURCE_QUEUE", "task-publisher-mandarake"),
TaskResultQueue: getEnv("TASK_RESULT_QUEUE", "tasks-results"),
},
Metrics: MetricsConfig{
Host: getEnv("METRICS_HOST", "0.0.0.0"),
Port: getEnv("METRICS_PORT", "19080"),
GinMode: getEnv("METRICS_GIN_MODE", "dev"),
},
}
}