29 lines
372 B
Go
29 lines
372 B
Go
package conf
|
|
|
|
import "sync"
|
|
|
|
type Config struct {
|
|
MongoURL string
|
|
Database string
|
|
LokiURL string
|
|
NatsURL string
|
|
ExecutionID string
|
|
Timeout int
|
|
WorkflowID string
|
|
Logs string
|
|
}
|
|
|
|
var instance *Config
|
|
var once sync.Once
|
|
|
|
func GetConfig() *Config {
|
|
once.Do(func() {
|
|
instance = &Config{}
|
|
})
|
|
return instance
|
|
}
|
|
|
|
func GetConfFromArgs(argument string) {
|
|
|
|
}
|