mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd:Ⓜ️:sync: Add opts to sync::item.
This commit is contained in:
parent
0f2dcf1706
commit
a780609b76
2 changed files with 18 additions and 5 deletions
|
@ -49,6 +49,8 @@ struct ircd::m::sync::item
|
|||
conf::item<bool> stats_debug;
|
||||
handle _polylog;
|
||||
handle _linear;
|
||||
json::strung feature;
|
||||
json::object opts;
|
||||
|
||||
public:
|
||||
string_view name() const;
|
||||
|
@ -59,8 +61,9 @@ struct ircd::m::sync::item
|
|||
bool polylog(data &);
|
||||
|
||||
item(std::string name,
|
||||
handle polylog = {},
|
||||
handle linear = {});
|
||||
handle polylog = {},
|
||||
handle linear = {},
|
||||
const json::members & = {});
|
||||
|
||||
item(item &&) = delete;
|
||||
item(const item &) = delete;
|
||||
|
|
16
ircd/m.cc
16
ircd/m.cc
|
@ -660,7 +660,8 @@ ircd::m::sync::item::instance_multimap::map
|
|||
|
||||
ircd::m::sync::item::item(std::string name,
|
||||
handle polylog,
|
||||
handle linear)
|
||||
handle linear,
|
||||
const json::members &feature)
|
||||
:instance_multimap
|
||||
{
|
||||
std::move(name)
|
||||
|
@ -688,12 +689,21 @@ ircd::m::sync::item::item(std::string name,
|
|||
{
|
||||
std::move(linear)
|
||||
}
|
||||
,feature
|
||||
{
|
||||
feature
|
||||
}
|
||||
,opts
|
||||
{
|
||||
this->feature
|
||||
}
|
||||
{
|
||||
log::debug
|
||||
{
|
||||
log, "Registered sync item(%p) '%s'",
|
||||
log, "Registered sync item(%p) '%s' (%zu features)",
|
||||
this,
|
||||
this->name()
|
||||
this->name(),
|
||||
opts.size(),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue