2018-09-01 09:51:40 +02: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-04 02:21:02 +01:00
|
|
|
struct data;
|
|
|
|
struct response;
|
2018-09-01 09:51:40 +02:00
|
|
|
|
2018-10-18 16:44:20 +02:00
|
|
|
extern const string_view description;
|
|
|
|
extern resource resource;
|
|
|
|
extern resource::method method_get;
|
|
|
|
|
2019-01-10 22:19:07 +01:00
|
|
|
extern conf::item<size_t> flush_hiwat;
|
|
|
|
extern conf::item<size_t> buffer_size;
|
2019-03-17 21:24:24 +01:00
|
|
|
extern conf::item<size_t> linear_buffer_size;
|
2019-02-27 02:02:21 +01:00
|
|
|
extern conf::item<size_t> linear_delta_max;
|
2019-03-07 20:53:58 +01:00
|
|
|
extern conf::item<bool> longpoll_enable;
|
2019-04-08 11:04:24 +02:00
|
|
|
extern conf::item<bool> polylog_phased;
|
2019-03-07 20:53:58 +01:00
|
|
|
extern conf::item<bool> polylog_only;
|
2019-01-10 22:19:07 +01:00
|
|
|
|
|
|
|
static const_buffer flush(data &, resource::response::chunked &, const const_buffer &);
|
2019-03-07 20:53:58 +01:00
|
|
|
static void empty_response(data &, const uint64_t &next_batch);
|
2019-02-27 02:02:21 +01:00
|
|
|
static bool linear_handle(data &);
|
|
|
|
static bool polylog_handle(data &);
|
2019-07-08 04:56:32 +02:00
|
|
|
static bool longpoll_handle(data &);
|
2018-09-01 09:51:40 +02:00
|
|
|
static resource::response handle_get(client &, const resource::request &);
|
|
|
|
}
|
|
|
|
|
2019-07-07 04:05:36 +02:00
|
|
|
#include "sync/args.h"
|