From a780609b760cab11c37d48c95ac70488fc263844 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 8 Apr 2019 01:53:09 -0700 Subject: [PATCH] ircd::m::sync: Add opts to sync::item. --- include/ircd/m/sync.h | 7 +++++-- ircd/m.cc | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/ircd/m/sync.h b/include/ircd/m/sync.h index e1c0c6a27..c63e62a13 100644 --- a/include/ircd/m/sync.h +++ b/include/ircd/m/sync.h @@ -49,6 +49,8 @@ struct ircd::m::sync::item conf::item 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; diff --git a/ircd/m.cc b/ircd/m.cc index e713772ab..2fb18b9db 100644 --- a/ircd/m.cc +++ b/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(), }; }