diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-21 21:54:36 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-21 21:54:36 +0100 |
commit | 012c6ad6724b6a6e155ee717e6d558e1fe199e43 (patch) | |
tree | 986377de04024911c1c460e41828dde546d5a6a6 /src/bayou.rs | |
parent | 4b8b48b48572115b943efdf6356a191871d46a55 (diff) | |
download | aerogramme-012c6ad6724b6a6e155ee717e6d558e1fe199e43.tar.gz aerogramme-012c6ad6724b6a6e155ee717e6d558e1fe199e43.zip |
initialize aws sdk with our info
Diffstat (limited to 'src/bayou.rs')
-rw-r--r-- | src/bayou.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bayou.rs b/src/bayou.rs index afe3c75..3c525b3 100644 --- a/src/bayou.rs +++ b/src/bayou.rs @@ -58,12 +58,12 @@ pub struct Bayou<S: BayouState> { } impl<S: BayouState> Bayou<S> { - pub fn new(creds: &Credentials, path: String) -> Result<Self> { - let storage = creds.storage.build()?; + pub async fn new(creds: &Credentials, path: String) -> Result<Self> { + let storage = creds.storage.build().await?; //let target = k2v_client.row(&path, WATCH_SK); let target = storage::RowRef::new(&path, WATCH_SK); - let watch = K2vWatch::new(creds, target.clone())?; + let watch = K2vWatch::new(creds, target.clone()).await?; Ok(Self { path, @@ -418,8 +418,8 @@ impl K2vWatch { /// Creates a new watch and launches subordinate threads. /// These threads hold Weak pointers to the struct; /// they exit when the Arc is dropped. - fn new(creds: &Credentials, target: storage::RowRef) -> Result<Arc<Self>> { - let storage = creds.storage.build()?; + async fn new(creds: &Credentials, target: storage::RowRef) -> Result<Arc<Self>> { + let storage = creds.storage.build().await?; let (tx, rx) = watch::channel::<storage::RowRef>(target.clone()); let notify = Notify::new(); |