mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd:Ⓜ️:keys: Add additional fetch to interface.
This commit is contained in:
parent
f1e3a9c53b
commit
e883f2a42b
2 changed files with 15 additions and 0 deletions
|
@ -64,6 +64,7 @@ struct ircd::m::keys
|
|||
static void get(const string_view &server_name, const closure &);
|
||||
static void get(const string_view &server_name, const string_view &key_id, const closure &);
|
||||
static void query(const string_view &query_server, const queries &, const closure_bool &);
|
||||
static size_t fetch(const queries &);
|
||||
|
||||
using super_type::tuple;
|
||||
using super_type::operator=;
|
||||
|
|
|
@ -300,6 +300,20 @@ ircd::m::keys_get_timeout
|
|||
{ "default", 20000L }
|
||||
};
|
||||
|
||||
size_t
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::keys::fetch(const queries &queries)
|
||||
{
|
||||
size_t ret(0);
|
||||
get(queries, [&ret](const auto &)
|
||||
{
|
||||
++ret;
|
||||
return true;
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
IRCD_MODULE_EXPORT
|
||||
ircd::m::keys::get(const string_view &server_name,
|
||||
|
|
Loading…
Reference in a new issue