[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

@@ -194,6 +194,11 @@ class MultiSession {
absl::Status StopSession(const std::string& instance_id)
ABSL_LOCKS_EXCLUDED(sessions_mutex_);
// Returns all instance ids that match the given filter. The filter may
// contain Windows-style wildcards, e.g. *, foo* or f?o.
// Matches are case sensitive.
std::vector<std::string> MatchSessions(const std::string& instance_id_filter);
// Returns true if there is an existing session for |instance_id|.
bool HasSession(const std::string& instance_id)
ABSL_LOCKS_EXCLUDED(sessions_mutex_);