Skip to content

Commit 1e57604

Browse files
gsa9989analogrelay
andauthored
Adding Location Cache (#2801)
### PR Summary: * Location cache is responsible for organizing the database account data gathered by the global endpoint manager. It holds the client’s preferred locations as well as lists of write and read regions separated by location and availability. Its purpose is to provide an available endpoint based on the client's preferred locations. * Added location cache functionality and tests. ### Implementation details: * APIs include: - update - refresh_endpoints - refresh_stale_endpoints - get_endpoints_by_location - get_preferred_available_endpoints - mark_endpoint_unavailable - is_endpoint_unavailable - resolve_service_endpoint #### Current limitations: * Currently does not support multi-write capabilities, planning to add it in a follow-up pr with global endpoint manager. --------- Co-authored-by: Ashley Stanton-Nurse <[email protected]>
1 parent 88c8db4 commit 1e57604

File tree

2 files changed

+622
-0
lines changed

2 files changed

+622
-0
lines changed

sdk/cosmos/azure_data_cosmos/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub(crate) mod utils;
2323

2424
pub mod models;
2525

26+
mod location_cache;
27+
2628
#[doc(inline)]
2729
pub use clients::CosmosClient;
2830

0 commit comments

Comments
 (0)