2018-09-01 00:51:40 -07:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
|
|
|
|
|
|
|
namespace ircd::m::sync
|
|
|
|
{
|
|
|
|
struct args;
|
|
|
|
struct stats;
|
2019-01-03 17:21:02 -08:00
|
|
|
struct data;
|
|
|
|
struct response;
|
2018-09-01 00:51:40 -07:00
|
|
|
|
2018-10-18 07:44:20 -07:00
|
|
|
extern const string_view description;
|
|
|
|
extern resource resource;
|
|
|
|
extern resource::method method_get;
|
|
|
|
|
2019-01-10 13:19:07 -08:00
|
|
|
extern conf::item<size_t> flush_hiwat;
|
|
|
|
extern conf::item<size_t> buffer_size;
|
2019-03-17 13:24:24 -07:00
|
|
|
extern conf::item<size_t> linear_buffer_size;
|
2019-02-26 17:02:21 -08:00
|
|
|
extern conf::item<size_t> linear_delta_max;
|
2019-03-07 11:53:58 -08:00
|
|
|
extern conf::item<bool> longpoll_enable;
|
2019-04-08 02:04:24 -07:00
|
|
|
extern conf::item<bool> polylog_phased;
|
2019-03-07 11:53:58 -08:00
|
|
|
extern conf::item<bool> polylog_only;
|
2019-01-10 13:19:07 -08:00
|
|
|
|
|
|
|
static const_buffer flush(data &, resource::response::chunked &, const const_buffer &);
|
2019-03-07 11:53:58 -08:00
|
|
|
static void empty_response(data &, const uint64_t &next_batch);
|
2019-02-26 17:02:21 -08:00
|
|
|
static bool linear_handle(data &);
|
|
|
|
static bool polylog_handle(data &);
|
2019-07-07 19:56:32 -07:00
|
|
|
static bool longpoll_handle(data &);
|
2018-09-01 00:51:40 -07:00
|
|
|
static resource::response handle_get(client &, const resource::request &);
|
|
|
|
}
|
|
|
|
|
2019-07-06 19:05:36 -07:00
|
|
|
#include "sync/args.h"
|