Ready to implement sync client manager

This commit is contained in:
2025-02-11 22:20:23 +01:00
parent bb1e412d36
commit 17e086b43c
6 changed files with 39 additions and 20 deletions

17
src/broadcast_messages.rs Normal file
View File

@ -0,0 +1,17 @@
use crate::sync_client::SyncClientID;
use crate::user::{APIClientID, UserID};
/// Broadcast messages
#[derive(Debug, Clone)]
pub enum BroadcastMessage {
/// Request to close the session of a specific client
CloseClientSession(APIClientID),
/// Close all the sessions of a given user
CloseAllUserSessions(UserID),
/// Stop sync client for a given user
StopSyncClientForUser(UserID),
/// Start sync client for a given user (if not already running)
StartSyncClientForUser(UserID),
/// Stop a client with a given client ID
StopSyncClient(SyncClientID),
}