cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::config::ClientConfig Class Reference

Class of configuration of clients. More...

#include <msgpack_rpc/config/client_config.h>

Collaboration diagram for msgpack_rpc::config::ClientConfig:

Public Member Functions

 ClientConfig ()
 Constructor.
ClientConfigadd_uri (addresses::URI uri)
 Add a URI of the server.
ClientConfigadd_uri (std::string_view uri)
 Add a URI of the server.
std::chrono::nanoseconds call_timeout () const noexcept
 Get the duration of timeout of RPCs.
ClientConfigcall_timeout (std::chrono::nanoseconds value)
 Set the duration of timeout of RPCs.
const ExecutorConfigexecutor () const noexcept
 Get the configuration of executors.
ExecutorConfigexecutor () noexcept
 Get the configuration of executors.
const MessageParserConfigmessage_parser () const noexcept
 Get the configuration of parsers of messages.
MessageParserConfigmessage_parser () noexcept
 Get the configuration of parsers of messages.
const ReconnectionConfigreconnection () const noexcept
 Get the configuration of reconnection.
ReconnectionConfigreconnection () noexcept
 Get the configuration of reconnection.
const std::vector< addresses::URI > & uris () const noexcept
 Get the URIs of the server.

Private Attributes

std::chrono::nanoseconds call_timeout_
 Duration of timeout of RPCs.
ExecutorConfig executor_
 Configuration of executors.
MessageParserConfig message_parser_
 Configuration of parsers of messages.
ReconnectionConfig reconnection_
 Configuration of reconnection.
std::vector< addresses::URIuris_
 URIs.

Detailed Description

Class of configuration of clients.

Definition at line 38 of file client_config.h.

Constructor & Destructor Documentation

◆ ClientConfig()

msgpack_rpc::config::ClientConfig::ClientConfig ( )

Constructor.

Note
No endpoint is registered in constructor, endpoints can be registered via member functions in this class.

Definition at line 39 of file client_config.cpp.

Member Function Documentation

◆ add_uri() [1/2]

ClientConfig & msgpack_rpc::config::ClientConfig::add_uri ( addresses::URI uri)

Add a URI of the server.

Parameters
[in]uriURI.
Returns
This.

Definition at line 41 of file client_config.cpp.

◆ add_uri() [2/2]

ClientConfig & msgpack_rpc::config::ClientConfig::add_uri ( std::string_view uri)

Add a URI of the server.

Parameters
[in]uriURI.
Returns
This.

Definition at line 46 of file client_config.cpp.

◆ call_timeout() [1/2]

std::chrono::nanoseconds msgpack_rpc::config::ClientConfig::call_timeout ( ) const
nodiscardnoexcept

Get the duration of timeout of RPCs.

Returns
Duration.

Definition at line 63 of file client_config.cpp.

◆ call_timeout() [2/2]

ClientConfig & msgpack_rpc::config::ClientConfig::call_timeout ( std::chrono::nanoseconds value)

Set the duration of timeout of RPCs.

Parameters
[in]valueValue.
Returns
This.

Definition at line 54 of file client_config.cpp.

◆ executor() [1/2]

const ExecutorConfig & msgpack_rpc::config::ClientConfig::executor ( ) const
nodiscardnoexcept

Get the configuration of executors.

Returns
Configuration of executors.

Definition at line 77 of file client_config.cpp.

◆ executor() [2/2]

ExecutorConfig & msgpack_rpc::config::ClientConfig::executor ( )
nodiscardnoexcept

Get the configuration of executors.

Returns
Configuration of executors.

Definition at line 75 of file client_config.cpp.

◆ message_parser() [1/2]

const MessageParserConfig & msgpack_rpc::config::ClientConfig::message_parser ( ) const
nodiscardnoexcept

Get the configuration of parsers of messages.

Returns
Configuration.

Definition at line 71 of file client_config.cpp.

◆ message_parser() [2/2]

MessageParserConfig & msgpack_rpc::config::ClientConfig::message_parser ( )
nodiscardnoexcept

Get the configuration of parsers of messages.

Returns
Configuration.

Definition at line 67 of file client_config.cpp.

◆ reconnection() [1/2]

const ReconnectionConfig & msgpack_rpc::config::ClientConfig::reconnection ( ) const
nodiscardnoexcept

Get the configuration of reconnection.

Returns
Configuration of reconnection.

Definition at line 85 of file client_config.cpp.

◆ reconnection() [2/2]

ReconnectionConfig & msgpack_rpc::config::ClientConfig::reconnection ( )
nodiscardnoexcept

Get the configuration of reconnection.

Returns
Configuration of reconnection.

Definition at line 81 of file client_config.cpp.

◆ uris()

const std::vector< addresses::URI > & msgpack_rpc::config::ClientConfig::uris ( ) const
nodiscardnoexcept

Get the URIs of the server.

Returns
URIs.

Definition at line 50 of file client_config.cpp.

Member Data Documentation

◆ call_timeout_

std::chrono::nanoseconds msgpack_rpc::config::ClientConfig::call_timeout_
private

Duration of timeout of RPCs.

Definition at line 133 of file client_config.h.

◆ executor_

ExecutorConfig msgpack_rpc::config::ClientConfig::executor_
private

Configuration of executors.

Definition at line 139 of file client_config.h.

◆ message_parser_

MessageParserConfig msgpack_rpc::config::ClientConfig::message_parser_
private

Configuration of parsers of messages.

Definition at line 136 of file client_config.h.

◆ reconnection_

ReconnectionConfig msgpack_rpc::config::ClientConfig::reconnection_
private

Configuration of reconnection.

Definition at line 142 of file client_config.h.

◆ uris_

std::vector<addresses::URI> msgpack_rpc::config::ClientConfig::uris_
private

URIs.

Definition at line 130 of file client_config.h.


The documentation for this class was generated from the following files: