Skip to main content

tuwunel_admin/query/sync/
mod.rs

1mod drop_connections;
2mod list_connections;
3mod show_connection;
4
5use clap::Subcommand;
6use ruma::{OwnedDeviceId, OwnedUserId};
7use tuwunel_core::Result;
8
9use crate::admin_command_dispatch;
10
11#[admin_command_dispatch]
12#[derive(Debug, Subcommand)]
13/// Query sync service state
14pub(crate) enum SyncCommand {
15	/// List sliding-sync connections.
16	ListConnections,
17
18	/// Show details of sliding sync connection by ID.
19	ShowConnection {
20		user_id: OwnedUserId,
21		device_id: Option<OwnedDeviceId>,
22		conn_id: Option<String>,
23	},
24
25	/// Drop connections for a user, device, or all.
26	DropConnections {
27		user_id: Option<OwnedUserId>,
28		device_id: Option<OwnedDeviceId>,
29		conn_id: Option<String>,
30	},
31}