openreplay/backend/internal/config/ender/config.go
Alexander 623e241afb
feat(backend): moved recording sessionStart to db into http service and sessionEnd into ender service (#545)
Co-authored-by: Alexander Zavorotynskiy <alexander@openreplay.com>
2022-06-20 09:26:05 +02:00

27 lines
749 B
Go

package ender
import (
"openreplay/backend/pkg/env"
)
type Config struct {
Postgres string
ProjectExpirationTimeoutMs int64
GroupEnder string
LoggerTimeout int
TopicRawWeb string
ProducerTimeout int
PartitionsNumber int
}
func New() *Config {
return &Config{
Postgres: env.String("POSTGRES_STRING"),
ProjectExpirationTimeoutMs: 1000 * 60 * 20,
GroupEnder: env.String("GROUP_ENDER"),
LoggerTimeout: env.Int("LOG_QUEUE_STATS_INTERVAL_SEC"),
TopicRawWeb: env.String("TOPIC_RAW_WEB"),
ProducerTimeout: 2000,
PartitionsNumber: env.Int("PARTITIONS_NUMBER"),
}
}