2024-07-25 18:48:25 +02:00
|
|
|
package conf
|
|
|
|
|
|
|
|
import "sync"
|
|
|
|
|
|
|
|
type Config struct {
|
2024-09-05 11:23:43 +02:00
|
|
|
MongoURL string
|
|
|
|
Database string
|
2024-08-19 11:43:40 +02:00
|
|
|
LokiURL string
|
2024-09-05 11:23:43 +02:00
|
|
|
NatsURL string
|
2024-08-19 11:43:40 +02:00
|
|
|
ExecutionID string
|
2024-08-22 10:52:49 +02:00
|
|
|
Timeout int
|
2024-08-19 11:43:40 +02:00
|
|
|
WorkflowID string
|
2024-09-05 11:23:43 +02:00
|
|
|
Logs string
|
2024-07-25 18:48:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var instance *Config
|
|
|
|
var once sync.Once
|
|
|
|
|
|
|
|
func GetConfig() *Config {
|
|
|
|
once.Do(func() {
|
|
|
|
instance = &Config{}
|
|
|
|
})
|
|
|
|
return instance
|
|
|
|
}
|
|
|
|
|
2024-08-06 11:42:37 +02:00
|
|
|
func GetConfFromArgs(argument string) {
|
2024-07-25 18:48:25 +02:00
|
|
|
|
2024-08-06 11:42:37 +02:00
|
|
|
}
|