feat(rabbitmq): add durable messaging client and broker config
This commit is contained in:
@@ -20,6 +20,7 @@ type Config struct {
|
||||
Logging LoggingConfig
|
||||
Database DatabaseConfig
|
||||
Redis RedisConfig
|
||||
Broker BrokerConfig
|
||||
S3 S3Config
|
||||
SessionStore string
|
||||
}
|
||||
@@ -57,6 +58,14 @@ func (c RedisConfig) URL() (string, error) {
|
||||
return readSecretFile(c.URLFile)
|
||||
}
|
||||
|
||||
type BrokerConfig struct {
|
||||
URLFile string
|
||||
}
|
||||
|
||||
func (c BrokerConfig) URL() (string, error) {
|
||||
return readSecretFile(c.URLFile)
|
||||
}
|
||||
|
||||
type S3Config struct {
|
||||
Endpoint string
|
||||
Region string
|
||||
@@ -108,6 +117,10 @@ func Load() Config {
|
||||
URLFile: getEnv("CACHE_URL_FILE", "/run/secrets/cache_url"),
|
||||
},
|
||||
|
||||
Broker: BrokerConfig{
|
||||
URLFile: getEnv("BROKER_URL_FILE", "/run/secrets/broker_url"),
|
||||
},
|
||||
|
||||
S3: LoadS3(),
|
||||
|
||||
SessionStore: getEnvSessionStore("SESSION_STORE", SessionStorePostgres),
|
||||
|
||||
Reference in New Issue
Block a user