Skip to main content

tuwunel_admin/query/pusher/
mod.rs

1mod drop_queue;
2mod get_pushers;
3mod list_queue;
4mod remove_pusher;
5mod retry_queue;
6
7use clap::Subcommand;
8use ruma::OwnedUserId;
9use tuwunel_core::Result;
10
11use crate::admin_command_dispatch;
12
13#[admin_command_dispatch]
14#[derive(Debug, Subcommand)]
15pub(crate) enum PusherCommand {
16	/// - Returns all the pushers for the user.
17	GetPushers {
18		/// Full user ID
19		user_id: OwnedUserId,
20	},
21
22	/// - Manually delete a pusher for a user.
23	RemovePusher {
24		/// Full user ID
25		user_id: OwnedUserId,
26
27		/// Pushkey
28		pushkey: String,
29	},
30
31	/// Drop pending pushes; already claimed work may continue or requeue.
32	DropQueue {
33		/// Full user ID.
34		user_id: OwnedUserId,
35
36		/// Pushkey.
37		pushkey: String,
38	},
39
40	/// List queued, active, and suppressed push events.
41	ListQueue {
42		/// Full user ID.
43		user_id: OwnedUserId,
44
45		/// Pushkey.
46		pushkey: String,
47	},
48
49	/// Retry durable pushes through the sender, preserving backoff and suppression.
50	RetryQueue {
51		/// Full user ID.
52		user_id: OwnedUserId,
53
54		/// Pushkey.
55		pushkey: String,
56	},
57}