cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Class to parse configuration. More...
#include <msgpack_rpc/config/config_parser.h>
Public Member Functions | |
ConfigParser () | |
Constructor. | |
const ClientConfig & | client_config (std::string_view name) const |
Get a configuration of client. | |
const LoggingConfig & | logging_config (std::string_view name) const |
Get a configuration of logging. | |
void | parse (std::string_view file_path) |
Parse a file. | |
const ServerConfig & | server_config (std::string_view name) const |
Get a configuration of server. |
Private Attributes | |
std::unordered_map< std::string, ClientConfig > | client_configs_ |
Configurations of clients. | |
std::unordered_map< std::string, LoggingConfig > | logging_configs_ |
Configurations of logging. | |
std::unordered_map< std::string, ServerConfig > | server_configs_ |
Configurations of servers. |
Class to parse configuration.
Definition at line 36 of file config_parser.h.
|
nodiscard |
Get a configuration of client.
[in] | name | Name of the configuration. |
Definition at line 46 of file config_parser.cpp.
|
nodiscard |
Get a configuration of logging.
[in] | name | Name of the configuration. |
Definition at line 37 of file config_parser.cpp.
void msgpack_rpc::config::ConfigParser::parse | ( | std::string_view | file_path | ) |
Parse a file.
[in] | file_path | File path. |
Definition at line 32 of file config_parser.cpp.
|
nodiscard |
Get a configuration of server.
[in] | name | Name of the configuration. |
Definition at line 55 of file config_parser.cpp.
|
private |
Configurations of clients.
Definition at line 82 of file config_parser.h.
|
private |
Configurations of logging.
Definition at line 79 of file config_parser.h.
|
private |
Configurations of servers.
Definition at line 85 of file config_parser.h.