pub struct HttpRegistryClient { /* private fields */ }Expand description
HTTP-backed implementation of RegistryClient.
Fetches and pushes data to a remote registry service for identity and attestation synchronization.
Usage:
ⓘ
use auths_infra_http::HttpRegistryClient;
let client = HttpRegistryClient::new();
let data = client.fetch_registry_data("https://registry.example.com", "identities/abc").await?;Implementations§
Source§impl HttpRegistryClient
impl HttpRegistryClient
pub fn new() -> Self
Sourcepub fn new_with_timeouts(
connect_timeout: Duration,
request_timeout: Duration,
) -> Self
pub fn new_with_timeouts( connect_timeout: Duration, request_timeout: Duration, ) -> Self
Create an HttpRegistryClient with explicit connect and request timeouts.
Args:
connect_timeout: Maximum time to establish a TCP connection.request_timeout: Maximum total time for the request to complete.
Usage:
ⓘ
let client = HttpRegistryClient::new_with_timeouts(
Duration::from_secs(30),
Duration::from_secs(60),
);Trait Implementations§
Source§impl Default for HttpRegistryClient
impl Default for HttpRegistryClient
Source§impl RegistryClient for HttpRegistryClient
impl RegistryClient for HttpRegistryClient
Source§fn fetch_registry_data(
&self,
registry_url: &str,
path: &str,
) -> impl Future<Output = Result<Vec<u8>, NetworkError>> + Send
fn fetch_registry_data( &self, registry_url: &str, path: &str, ) -> impl Future<Output = Result<Vec<u8>, NetworkError>> + Send
Fetches data from a registry at the given logical path. Read more
Auto Trait Implementations§
impl Freeze for HttpRegistryClient
impl !RefUnwindSafe for HttpRegistryClient
impl Send for HttpRegistryClient
impl Sync for HttpRegistryClient
impl Unpin for HttpRegistryClient
impl UnsafeUnpin for HttpRegistryClient
impl !UnwindSafe for HttpRegistryClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more