Skip to main content

origincloud_location/
lib.rs

1//! The Origin Cloud location service: the platform's regions and zones, and
2//! the services each zone offers. A global service: it answers at
3//! `location.origincloudapis.eu` whatever region the client has.
4//!
5//! The clients are generated from the API definitions; what they share,
6//! such as credentials, retries and errors, is in [`origincloud_core`].
7//!
8//! ```no_run
9//! use origincloud_location::v1beta1::{ListZonesRequest, LocationClient};
10//!
11//! # async fn example() -> Result<(), origincloud_core::Error> {
12//! let client = origincloud_core::Client::new()?;
13//! let zones = LocationClient::new(&client)
14//!     .list_zones(ListZonesRequest::default())
15//!     .await?
16//!     .zones;
17//! for zone in zones.iter().filter(|zone| zone.services.iter().any(|s| s == "pvs")) {
18//!     println!("{} offers volumes", zone.name);
19//! }
20//! # Ok(())
21//! # }
22//! ```
23
24mod generated;
25
26pub use generated::*;