mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
modules/federation: Add various conf items for flush high-watermarks.
This commit is contained in:
parent
ce6c4d357e
commit
8c87fbed46
2 changed files with 26 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue