mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-06-14 08:39:50 +02:00
42 lines
898 B
Rust
42 lines
898 B
Rust
use std::path::PathBuf;
|
|
|
|
use tokio::sync::{mpsc, oneshot};
|
|
use uuid::Uuid;
|
|
|
|
use super::{PayloadData, Result, UpdateMeta, UpdateStatus};
|
|
|
|
pub enum UpdateMsg<D> {
|
|
Update {
|
|
uuid: Uuid,
|
|
meta: UpdateMeta,
|
|
data: mpsc::Receiver<PayloadData<D>>,
|
|
ret: oneshot::Sender<Result<UpdateStatus>>,
|
|
},
|
|
ListUpdates {
|
|
uuid: Uuid,
|
|
ret: oneshot::Sender<Result<Vec<UpdateStatus>>>,
|
|
},
|
|
GetUpdate {
|
|
uuid: Uuid,
|
|
ret: oneshot::Sender<Result<UpdateStatus>>,
|
|
id: u64,
|
|
},
|
|
Delete {
|
|
uuid: Uuid,
|
|
ret: oneshot::Sender<Result<()>>,
|
|
},
|
|
Create {
|
|
uuid: Uuid,
|
|
ret: oneshot::Sender<Result<()>>,
|
|
},
|
|
Snapshot {
|
|
uuid: Uuid,
|
|
path: PathBuf,
|
|
ret: oneshot::Sender<Result<()>>,
|
|
},
|
|
IsLocked {
|
|
uuid: Uuid,
|
|
ret: oneshot::Sender<Result<bool>>,
|
|
},
|
|
}
|