24#include <boost/program_options.hpp>
28#include <seastar/core/future.hh>
31#include <seastar/core/sstring.hh>
32#include <seastar/util/program-options.hh>
34#include <seastar/core/scollectd.hh>
35#include <seastar/util/log-cli.hh>
36#include <seastar/util/modules.hh>
60 sstring description =
"";
61 std::chrono::duration<double> default_task_quota = std::chrono::microseconds(500);
72 bool auto_handle_sigint_sigterm =
true;
75 unsigned max_networking_aio_io_control_blocks = 10000;
81 size_t reserve_additional_memory_per_shard = 0;
86 struct seastar_options :
public program_options::option_group {
97 sstring description =
"";
108 bool auto_handle_sigint_sigterm =
true;
110 reactor_options reactor_opts;
112 metrics::options metrics_opts;
114 smp_options smp_opts;
116 scollectd::options scollectd_opts;
118 log_cli::options log_opts;
123 using configuration_reader = std::function<void (boost::program_options::variables_map&)>;
126 std::unique_ptr<alien::instance> _alien;
129 std::shared_ptr<smp> _smp;
130 seastar_options _opts;
131 boost::program_options::options_description _app_opts;
132 boost::program_options::options_description _seastar_opts;
133 boost::program_options::options_description _opts_conf_file;
134 boost::program_options::positional_options_description _pos_opts;
135 std::optional<boost::program_options::variables_map> _configuration;
136 configuration_reader _conf_reader;
138 configuration_reader get_default_configuration_reader();
140 struct positional_option {
142 const boost::program_options::value_semantic* value_semantic;
147 explicit app_template(seastar_options opts);
148 explicit app_template(config cfg = config());
151 const seastar_options& options()
const;
154 boost::program_options::options_description& get_conf_file_options_description();
155 boost::program_options::options_description_easy_init add_options();
156 void add_positional_options(std::initializer_list<positional_option> options);
157 boost::program_options::variables_map& configuration();
158 int run_deprecated(
int ac,
char ** av, std::function<
void ()>&& func)
noexcept;
160 void set_configuration_reader(configuration_reader conf_reader);
164 alien::instance& alien() {
return *_alien; }
169 int run(
int ac,
char ** av, std::function<future<int> ()>&& func)
noexcept;
174 int run(
int ac,
char ** av, std::function<future<> ()>&& func)
noexcept;
header file for metric API layer (like prometheus or collectd)
boost::program_options::options_description get_options_description()
Options for controlling logging at run-time.
Seastar API namespace.
Definition: abort_on_ebadf.hh:26