|
libcaf
0.15.5
|
Configures an actor_system on startup.
More...
#include <actor_system_config.hpp>
Public Types | |
| using | hook_factory = std::function< io::hook *(actor_system &)> |
| using | hook_factory_vector = std::vector< hook_factory > |
| using | thread_hooks = std::vector< std::unique_ptr< thread_hook > > |
| template<class K , class V > | |
| using | hash_map = std::unordered_map< K, V > |
| using | module_factory = std::function< actor_system::module *(actor_system &)> |
| using | module_factory_vector = std::vector< module_factory > |
| using | value_factory = std::function< type_erased_value_ptr()> |
| using | value_factory_string_map = hash_map< std::string, value_factory > |
| using | value_factory_rtti_map = hash_map< std::type_index, value_factory > |
| using | actor_factory_map = hash_map< std::string, actor_factory > |
| using | portable_name_map = hash_map< std::type_index, std::string > |
| using | error_renderer = std::function< std::string(uint8_t, atom_value, const message &)> |
| using | error_renderer_map = hash_map< atom_value, error_renderer > |
| using | option_ptr = std::unique_ptr< config_option > |
| using | option_vector = std::vector< option_ptr > |
| using | group_module_factory = std::function< group_module *()> |
| using | group_module_factory_vector = std::vector< group_module_factory > |
| using | named_actor_config_map = hash_map< std::string, named_actor_config > |
Public Member Functions | |
| actor_system_config (actor_system_config &&) | |
| actor_system_config (const actor_system_config &)=delete | |
| actor_system_config & | operator= (const actor_system_config &)=delete |
| actor_system_config & | parse (message &args, std::istream &ini) |
Parses args as tuple of strings containing CLI options and ini_stream as INI formatted input stream. More... | |
| actor_system_config & | parse (int argc, char **argv, std::istream &ini) |
Parses the CLI options {argc, argv} and ini_stream as INI formatted input stream. More... | |
| actor_system_config & | parse (int argc, char **argv, const char *ini_file_cstr=nullptr) |
Parses the CLI options {argc, argv} and tries to open config_file_name as INI formatted config file. More... | |
| actor_system_config & | add_actor_factory (std::string name, actor_factory fun) |
Allows other nodes to spawn actors created by fun dynamically by using name as identifier. More... | |
| template<class T , class... Ts> | |
| actor_system_config & | add_actor_type (std::string name) |
Allows other nodes to spawn actors of type T dynamically by using name as identifier. More... | |
| template<class F > | |
| actor_system_config & | add_actor_type (std::string name, F f) |
Allows other nodes to spawn actors implemented by function f dynamically by using name as identifier. More... | |
| template<class T > | |
| actor_system_config & | add_message_type (std::string name) |
Adds message type T with runtime type info name. | |
| actor_system_config & | add_error_category (atom_value x, error_renderer y) |
Enables the actor system to convert errors of this error category to human-readable strings via renderer. More... | |
| template<class T > | |
| actor_system_config & | add_error_category (atom_value category) |
Enables the actor system to convert errors of this error category to human-readable strings via to_string(T). More... | |
| template<class T , class... Ts> | |
| actor_system_config & | load () |
Loads module T with optional template parameters Ts.... | |
| template<class Factory > | |
| actor_system_config & | add_hook_factory (Factory f) |
| Adds a factory for a new hook type to the middleman (if loaded). | |
| template<class Hook > | |
| actor_system_config & | add_hook_type () |
| Adds a hook type to the middleman (if loaded). | |
| template<class Hook , class... Ts> | |
| actor_system_config & | add_thread_hook (Ts &&... ts) |
| Adds a hook type to the scheduler. | |
| actor_system_config & | set (const char *cn, config_value cv) |
Sets a config by using its INI name config_name to config_value. | |
| template<class F > | |
| void | for_each_option (F f) const |
Public Attributes | |
| bool | cli_helptext_printed |
| Stores whether the help text for this config object was printed. More... | |
| bool | slave_mode |
| Stores whether this node was started in slave mode. | |
| std::string | slave_name |
| Stores the name of this node when started in slave mode. | |
| std::string | bootstrap_node |
| Stores credentials for connecting to the bootstrap node when using the caf-run launcher. More... | |
| message | args_remainder |
| Stores CLI arguments that were not consumed by CAF. | |
| atom_value | scheduler_policy |
| size_t | scheduler_max_threads |
| size_t | scheduler_max_throughput |
| bool | scheduler_enable_profiling |
| size_t | scheduler_profiling_ms_resolution |
| std::string | scheduler_profiling_output_file |
| size_t | work_stealing_aggressive_poll_attempts |
| size_t | work_stealing_aggressive_steal_interval |
| size_t | work_stealing_moderate_poll_attempts |
| size_t | work_stealing_moderate_steal_interval |
| size_t | work_stealing_moderate_sleep_duration_us |
| size_t | work_stealing_relaxed_steal_interval |
| size_t | work_stealing_relaxed_sleep_duration_us |
| std::string | logger_file_name |
| std::string | logger_file_format |
| atom_value | logger_console |
| std::string | logger_console_format |
| std::string | logger_component_filter |
| atom_value | logger_verbosity |
| bool | logger_inline_output |
| std::string &logger_filename | CAF_DEPRECATED |
| std::string &logger_filter | CAF_DEPRECATED |
| atom_value | middleman_network_backend |
| std::string | middleman_app_identifier |
| bool | middleman_enable_automatic_connections |
| size_t | middleman_max_consecutive_reads |
| size_t | middleman_heartbeat_interval |
| bool | middleman_detach_utility_actors |
| bool | middleman_detach_multiplexer |
| bool | middleman_enable_tcp |
| bool | middleman_enable_udp |
| size_t | middleman_cached_udp_buffers |
| size_t | middleman_max_pending_msgs |
| std::string | opencl_device_ids |
| std::string | openssl_certificate |
| std::string | openssl_key |
| std::string | openssl_passphrase |
| std::string | openssl_capath |
| std::string | openssl_cafile |
| value_factory_string_map | value_factories_by_name |
| value_factory_rtti_map | value_factories_by_rtti |
| actor_factory_map | actor_factories |
| module_factory_vector | module_factories |
| hook_factory_vector | hook_factories |
| group_module_factory_vector | group_module_factories |
| thread_hooks | thread_hooks_ |
| portable_name_map | type_names_by_rtti |
| error_renderer_map | error_renderers |
| named_actor_config_map | named_actor_configs |
| int(* | slave_mode_fun )(actor_system &, const actor_system_config &) |
Protected Member Functions | |
| virtual std::string | make_help_text (const std::vector< message::cli_arg > &) |
Protected Attributes | |
| option_vector | custom_options_ |
Configures an actor_system on startup.
| actor_system_config& caf::actor_system_config::add_actor_factory | ( | std::string | name, |
| actor_factory | fun | ||
| ) |
Allows other nodes to spawn actors created by fun dynamically by using name as identifier.
| actor_system_config& caf::actor_system_config::add_actor_type | ( | std::string | name | ) |
Allows other nodes to spawn actors of type T dynamically by using name as identifier.
| actor_system_config& caf::actor_system_config::add_actor_type | ( | std::string | name, |
| F | f | ||
| ) |
Allows other nodes to spawn actors implemented by function f dynamically by using name as identifier.
| actor_system_config& caf::actor_system_config::add_error_category | ( | atom_value | x, |
| error_renderer | y | ||
| ) |
Enables the actor system to convert errors of this error category to human-readable strings via renderer.
| actor_system_config& caf::actor_system_config::add_error_category | ( | atom_value | category | ) |
Enables the actor system to convert errors of this error category to human-readable strings via to_string(T).
| actor_system_config& caf::actor_system_config::parse | ( | message & | args, |
| std::istream & | ini | ||
| ) |
Parses args as tuple of strings containing CLI options and ini_stream as INI formatted input stream.
| actor_system_config& caf::actor_system_config::parse | ( | int | argc, |
| char ** | argv, | ||
| std::istream & | ini | ||
| ) |
Parses the CLI options {argc, argv} and ini_stream as INI formatted input stream.
| actor_system_config& caf::actor_system_config::parse | ( | int | argc, |
| char ** | argv, | ||
| const char * | ini_file_cstr = nullptr |
||
| ) |
Parses the CLI options {argc, argv} and tries to open config_file_name as INI formatted config file.
The parsers tries to open caf-application.ini if config_file_name is nullptr.
| std::string caf::actor_system_config::bootstrap_node |
Stores credentials for connecting to the bootstrap node when using the caf-run launcher.
| bool caf::actor_system_config::cli_helptext_printed |
Stores whether the help text for this config object was printed.
If set to true, the application should not use this config object to initialize an actor_system and return from main immediately.
1.8.14