Conversation
Signed-off-by: Zachary Edgell <zacharyedgell@gmail.com>
Signed-off-by: Zachary Edgell <zacharyedgell@gmail.com>
Signed-off-by: Zachary Edgell <zacharyedgell@gmail.com>
Signed-off-by: Zachary Edgell <zacharyedgell@gmail.com>
mikeee
left a comment
There was a problem hiding this comment.
Great stuff, some minor suggestions
| /// Distributed lock request call | ||
| /// | ||
| /// # Arguments | ||
| /// | ||
| /// * `request` - Request to be made, TryLockRequest | ||
| pub async fn lock(&mut self, request: TryLockRequest) -> Result<TryLockResponse, Error> { | ||
| self.0.lock(request).await | ||
| } | ||
|
|
||
| /// Distributed lock request call | ||
| /// | ||
| /// # Arguments | ||
| /// | ||
| /// * `request` - Request to be made, TryLockRequest | ||
| pub async fn unlock(&mut self, request: UnlockRequest) -> Result<UnlockResponse, Error> { | ||
| self.0.unlock(request).await | ||
| } |
There was a problem hiding this comment.
I think it would be beneficial to have examples here in the doc comments of building and using the api call e.g.
/// # Example
///
/// ```
/// let result = client
/// .try_lock(dapr::client::TryLockRequest {
/// store_name: "lockstore".to_string(),
/// resource_id: "resource".to_string(),
/// lock_owner: "owner".to_string(),
/// expiry_in_seconds: 60,
/// })
/// .await
/// .unwrap();
/// ```
Signed-off-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: mikeee <hey@mike.ee>
Signed-off-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Mike Nguyen <hey@mike.ee>
Co-authored-by: Mike Nguyen <hey@mike.ee> Signed-off-by: Zachary K Edgell <zacharyedgell@gmail.com>
Co-authored-by: Mike Nguyen <hey@mike.ee> Signed-off-by: Zachary K Edgell <zacharyedgell@gmail.com>
Co-authored-by: Mike Nguyen <hey@mike.ee> Signed-off-by: Zachary K Edgell <zacharyedgell@gmail.com>
Signed-off-by: Mike Nguyen <hey@mike.ee>
mikeee
left a comment
There was a problem hiding this comment.
We can create another issue to track adding documentation but before a final review the APIs need to be defined in the interface -> https://github.com/dapr/rust-sdk/pull/159/files#diff-7f93c4e263c4e9ec748f804c7fd04a3b2fde86ffd741fb5516d67e1097bae4c1L545
|
This pull request has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Description
Added distributed lock API
Issue reference
This PR will close #86
Checklist