feat(rabbitmq): add durable messaging client and broker config

This commit is contained in:
kk10
2026-11-14 17:46:50 +03:00
parent e889d2e292
commit d745395aa0
4 changed files with 128 additions and 0 deletions
+13
View File
@@ -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),