0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

modules/federation: Add various conf items for flush high-watermarks.

This commit is contained in:
Jason Volk 2018-05-08 00:15:18 -07:00
parent ce6c4d357e
commit 8c87fbed46
2 changed files with 26 additions and 2 deletions

View file

@ -56,6 +56,13 @@ backfill_limit_default
{ "default", 64L },
};
conf::item<size_t>
backfill_flush_hiwat
{
{ "name", "ircd.federation.backfill.flush.hiwat" },
{ "default", 16384L },
};
resource::response
get__backfill(client &client,
const resource::request &request)
@ -92,13 +99,18 @@ get__backfill(client &client,
client, http::OK
};
json::stack out{buf, [&response]
const auto flush{[&response]
(const const_buffer &buf)
{
response.write(buf);
return buf;
}};
json::stack out
{
buf, flush, size_t(backfill_flush_hiwat)
};
json::stack::object top{out};
json::stack::member pdus_m
{

View file

@ -26,6 +26,13 @@ state_resource
}
};
conf::item<size_t>
state_flush_hiwat
{
{ "name", "ircd.federation.state.flush.hiwat" },
{ "default", 16384L },
};
resource::response
get__state(client &client,
const resource::request &request)
@ -59,13 +66,18 @@ get__state(client &client,
client, http::OK
};
json::stack out{buf, [&response]
const auto flush{[&response]
(const const_buffer &buf)
{
response.write(buf);
return buf;
}};
json::stack out
{
buf, flush, size_t(state_flush_hiwat)
};
json::stack::object top{out};
json::stack::member pdus_m
{