Skip to content

Commit 68fa25a

Browse files
committed
[storage/gridfs] Add repl_set_name in env configuration
1 parent f766f92 commit 68fa25a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/config/storage.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ pub(crate) mod gridfs {
372372
pub const CREDENTIAL_MECHANISM: &str = "UME_STORAGE_GRIDFS_CREDENTIAL_MECHANISM";
373373
pub const CREDENTIAL_SOURCE: &str = "UME_STORAGE_GRIDFS_CREDENTIAL_SOURCE";
374374
pub const CONNECT_TIMEOUT: &str = "UME_STORAGE_GRIDFS_CONNECT_TIMEOUT";
375+
pub const REPLICA_SET: &str = "UME_STORAGE_GRIDFS_REPLICA_SET";
375376
pub const CREDENTIAL: &str = "UME_STORAGE_GRIDFS_CREDENTIALS";
376377
pub const APP_NAME: &str = "UME_STORAGE_GRIDFS_APP_NAME";
377378
pub const HOSTS: &str = "UME_STORAGE_GRIDFS_SERVERS";
@@ -432,6 +433,7 @@ pub(crate) mod gridfs {
432433
}
433434

434435
merge_tuple!(me.client_options.credential, other.client_options.credential);
436+
merge_tuple!(me.client_options.repl_set_name, other.client_options.repl_set_name);
435437
}
436438

437439
me.database.merge(other.database);
@@ -458,6 +460,7 @@ pub(crate) mod gridfs {
458460
.connect_timeout(parse_connect_timeout()?)
459461
.hosts(parse_hosts()?)
460462
.credential(parse_credentials()?)
463+
.repl_set_name(env::try_parse_optional(REPLICA_SET)?)
461464
.build())
462465
}
463466

0 commit comments

Comments
 (0)