put_object func add lock

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2024-09-27 10:31:16 +08:00
parent ca3dac9a25
commit a65b074e9f
11 changed files with 107 additions and 21 deletions
+3 -3
View File
@@ -7,11 +7,11 @@ use tracing::info;
use crate::{lock_args::LockArgs, Locker};
#[derive(Debug, Clone)]
pub struct RemoteClinet {
pub struct RemoteClient {
url: url::Url,
}
impl RemoteClinet {
impl RemoteClient {
pub fn new(url: url::Url) -> Self {
Self { url }
}
@@ -24,7 +24,7 @@ impl RemoteClinet {
}
#[async_trait]
impl Locker for RemoteClinet {
impl Locker for RemoteClient {
async fn lock(&mut self, args: &LockArgs) -> Result<bool> {
info!("remote lock");
let args = serde_json::to_string(args)?;