Seastar
High performance C++ framework for concurrent servers
Public Types | Public Member Functions | Public Attributes | List of all members
seastar::app_template::seastar_options Struct Reference

Detailed Description

Seastar configuration options.

#include <seastar/core/app-template.hh>

Inheritance diagram for seastar::app_template::seastar_options:
seastar::program_options::option_group

Public Types

using value_list_type = boost::intrusive::list< basic_value, boost::intrusive::base_hook< list_base_hook >, boost::intrusive::constant_time_size< false > >
 
using option_group_list_type = boost::intrusive::list< option_group, boost::intrusive::base_hook< list_base_hook >, boost::intrusive::constant_time_size< false > >
 

Public Member Functions

 operator bool () const
 Does the option group has any values contained in it?
 
bool used () const
 
const std::string & name () const
 
const value_list_type & values () const
 
value_list_type & values ()
 
void describe (options_descriptor &descriptor) const
 
void mutate (options_mutator &mutator)
 

Public Attributes

sstring name = "App"
 
sstring description = ""
 
bool auto_handle_sigint_sigterm = true
 Handle SIGINT/SIGTERM by calling reactor::stop() More...
 
reactor_options reactor_opts
 Configuration options for the reactor.
 
metrics::options metrics_opts
 Configuration for the metrics sub-system.
 
smp_options smp_opts
 Configuration options for the smp aspect of seastar.
 
scollectd::options scollectd_opts
 Configuration for the scollectd sub-system.
 
log_cli::options log_opts
 Configuration for the logging sub-system.
 

Member Function Documentation

◆ describe()

void seastar::program_options::option_group::describe ( options_descriptor descriptor) const
inherited

Describe the content of this option group to the visitor.

The content is visited in a depth-first manner:

  • First the option groups itself is visited with options_descriptor::visit_group_start(). If this returns false the entire content of the group, including all its subgroups and values are skipped and options_descriptor::visit_group_end() is called immediately. Otherwise visiting the content of the group proceeds.
  • All the values contained therein are visited. For each value the following happens:
    • First options_descriptor::visit_value_metadata() is called with generic metadata that all values have. If this return false the value is skipped, otherwise visiting the value proceeds.
    • Then the appropriate overload of options_descriptor::visit_value() is called, with a pointer to the default value of the respective value. The pointer is null if there is no default value.
    • For selection_value, options_descriptor::visit_selection_value() will be called instead of options_descriptor::visit_value(). After the value is visited, the option_group instance belonging to each candidate (if set) will be visited.
  • All the nested option_group instances in the current group are visited.
  • Finally options_descriptor::visit_group_end() is called.

◆ mutate()

void seastar::program_options::option_group::mutate ( options_mutator mutator)
inherited

Mutate the content of this option group by the visitor.

The visiting algorithm is identical to that of describe(), with the following differences:

  • options_mutator::visit_value() is allowed to mutate the value through the passed-in reference. It should return true if it did so and false otherwise.
  • When visiting a selection value, only the nested group belonging to the selected value is visited afterwards.

Member Data Documentation

◆ auto_handle_sigint_sigterm

bool seastar::app_template::seastar_options::auto_handle_sigint_sigterm = true

Handle SIGINT/SIGTERM by calling reactor::stop()

When true, Seastar will set up signal handlers for SIGINT/SIGTERM that call reactor::stop(). The reactor will then execute callbacks installed by reactor::at_exit().

When false, Seastar will not set up signal handlers for SIGINT/SIGTERM automatically. The default behavior (terminate the program) will be kept. You can adjust the behavior of SIGINT/SIGTERM by installing signal handlers via reactor::handle_signal().

◆ description

sstring seastar::app_template::seastar_options::description = ""

The description of the application.

Will be printed on the top of the –help output. Lines should be hard-wrapped for 80 chars.

◆ name

sstring seastar::app_template::seastar_options::name = "App"

The name of the application.

Will be used in the –help output to distinguish command line args registered by the application, as opposed to those registered by seastar and its subsystems.


The documentation for this struct was generated from the following file: