[cdc_stream] Add wildcard support to stop command (#30)

Adds support for stuff like cdc_stream stop * or cdc_stream stop user*:dir*.
This commit is contained in:
Lutz Justen
2022-12-05 10:09:37 +01:00
committed by GitHub
parent 90717ce670
commit 1b8ad0e097
9 changed files with 60 additions and 9 deletions

View File

@@ -58,9 +58,11 @@ class SessionManager {
metrics::SessionStartStatus* metrics_status)
ABSL_LOCKS_EXCLUDED(sessions_mutex_);
// Stops the session for the given |instance_id|.
// Stops all sessions that match the given |instance_id_filter|.
// The filter may contain Windows-style wildcards like * and ?.
// Matching is case-sensitive.
// Returns a NotFound error if no session exists.
absl::Status StopSession(const std::string& instance_id)
absl::Status StopSession(const std::string& instance_id_filter)
ABSL_LOCKS_EXCLUDED(sessions_mutex_);
// Shuts down all existing MultiSessions.