pub fn is_serendb_target(url: &str) -> boolExpand description
Check if a PostgreSQL URL points to a SerenDB instance
SerenDB hosts have domains ending with .serendb.com
§Arguments
url- PostgreSQL connection string to check
§Returns
Returns true if the URL points to a SerenDB host.
§Examples
use database_replicator::utils::is_serendb_target;
assert!(is_serendb_target("postgresql://user:pass@db.serendb.com/mydb"));
assert!(is_serendb_target("postgresql://user:pass@cluster-123.console.serendb.com/mydb"));
assert!(!is_serendb_target("postgresql://user:pass@localhost/mydb"));
assert!(!is_serendb_target("postgresql://user:pass@rds.amazonaws.com/mydb"));