openreplay/backend/internal/config/sink/config.go
Alexander 6b5d9d3799
feat(backend): added new trigger which sink should send to storage after session end received (#539)
Co-authored-by: Alexander Zavorotynskiy <alexander@openreplay.com>
2022-06-15 11:45:52 +02:00

33 lines
897 B
Go

package sink
import (
"openreplay/backend/pkg/env"
)
type Config struct {
FsDir string
FsUlimit uint16
GroupSink string
TopicRawWeb string
TopicRawIOS string
TopicCache string
TopicTrigger string
CacheAssets bool
AssetsOrigin string
ProducerCloseTimeout int
}
func New() *Config {
return &Config{
FsDir: env.String("FS_DIR"),
FsUlimit: env.Uint16("FS_ULIMIT"),
GroupSink: env.String("GROUP_SINK"),
TopicRawWeb: env.String("TOPIC_RAW_WEB"),
TopicRawIOS: env.String("TOPIC_RAW_IOS"),
TopicCache: env.String("TOPIC_CACHE"),
TopicTrigger: env.String("TOPIC_TRIGGER"),
CacheAssets: env.Bool("CACHE_ASSETS"),
AssetsOrigin: env.String("ASSETS_ORIGIN"),
ProducerCloseTimeout: 15000,
}
}