-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Our public facing StreamAddress type is how users specify which hosts they want to connect to via ClientOptions. This name is slightly inaccurate, however, since it often contains a DNS name that then gets resolved to an actual address to be used for the TCP stream.
Of the other drivers that have a similar type, Java, C#, and Swift name it (Mongo)ServerAddress, and C++ names it host. For consistency with other drivers, ServerAddress seems like a good name, though Host or HostAddress would also work (given that the ClientOptions field that contains them is named hosts).
Additionally, in order to support alternative addresses types in the future (e.g. Unix Domain Socket file paths), we could restructure this as an enum like tokio-postgres and redis do.