 |
Kea
1.5.0
|
Go to the documentation of this file.
13 #include <boost/shared_ptr.hpp>
83 void setName(
const std::string& name);
118 void setRole(
const std::string& role);
138 return (auto_failover_);
146 auto_failover_ = auto_failover;
239 std::map<int, StateConfigPtr> states_;
284 void setHAMode(
const std::string& ha_mode);
std::string getName() const
Returns server name.
PeerConfigMap getAllServersConfig() const
Returns configurations of all servers.
uint32_t getMaxResponseDelay() const
Returns max response delay.
Storage for High Availability configuration.
StatePausing
State machine pausing modes.
HAMode getHAMode() const
Returns mode of operation.
StateConfig(const int state)
Constructor.
PeerConfigPtr getThisServerConfig() const
Returns configuration of this server.
bool send_lease_updates_
Send lease updates to partner?
uint32_t getMaxUnackedClients() const
Returns maximum number of clients which may fail to communicate with the DHCP server before entering ...
bool amSyncingLeases() const
Returns boolean flag indicating whether the active servers should synchronize their lease databases u...
void validate() const
Validates configuration.
void setThisServerName(const std::string &this_server_name)
Sets name of this server.
Role getRole() const
Returns server's role.
void setAutoFailover(const bool auto_failover)
Enables/disables auto-failover function for the server.
PeerConfigMap getOtherServersConfig() const
Returns configuration of other servers.
static std::string HAModeToString(const HAMode &ha_mode)
Returns HA mode name.
int getState() const
Returns identifier of the state.
void setName(const std::string &name)
Sets server name.
HAConfigValidationError(const char *file, size_t line, const char *what)
util::StatePausing getPausing() const
Returns pausing mode for the given state.
uint32_t sync_page_limit_
Page size limit while synchronizing leases.
uint32_t heartbeat_delay_
Heartbeat delay in milliseconds.
uint32_t max_unacked_clients_
Maximum number of unacked clients.
uint32_t getHeartbeatDelay() const
Returns heartbeat delay in milliseconds.
boost::shared_ptr< StateMachineConfig > StateMachineConfigPtr
Pointer to a state machine configuration.
std::string getLogLabel() const
Returns a string identifying a server used in logging.
void setMaxAckDelay(const uint32_t max_ack_delay)
Sets maximum time for a client trying to communicate with DHCP server to completed the transaction.
PeerConfigMap peers_
Map of peers' configurations.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
std::string this_server_name_
This server name.
StateMachineConfigPtr getStateMachineConfig() const
Returns state machine configuration.
static HAMode stringToHAMode(const std::string &ha_mode)
Decodes HA mode provided as string.
boost::shared_ptr< StateConfig > StateConfigPtr
Pointer to the state configuration.
void setSendLeaseUpdates(const bool send_lease_updates)
Sets boolean flag indicating whether lease updates should be sent to the partner.
HAMode ha_mode_
Mode of operation.
uint32_t getSyncPageLimit() const
Returns maximum number of leases per page to be fetched during database synchronization.
uint32_t sync_timeout_
Timeout for syncing lease database (ms)
std::string getThisServerName() const
Returns name of this server.
Exception thrown when configuration validation fails.
bool amSendingLeaseUpdates() const
Returns boolean flag indicating whether lease updates should be sent to the partner.
static util::StatePausing stringToPausing(const std::string &pausing)
Converts pausing mode from the textual form.
StateMachineConfigPtr state_machine_
State machine configuration.
bool isAutoFailover() const
Checks if the auto-failover function is enabled for the server.
void setSyncTimeout(const uint32_t sync_timeout)
Sets new lease database syncing timeout in milliseconds.
uint32_t getMaxAckDelay() const
Returns maximum time for a client trying to communicate with DHCP server to complete the transaction.
bool sync_leases_
Synchronize databases on startup?
static std::string pausingToString(const util::StatePausing &pausing)
Returns pausing mode in the textual form.
void setSyncPageLimit(const uint32_t sync_page_limit)
Sets new page limit size for leases fetched from the partner during database synchronization.
std::map< std::string, PeerConfigPtr > PeerConfigMap
Map of the servers' configurations.
void setRole(const std::string &role)
Sets servers role.
uint32_t max_ack_delay_
Maximum DHCP message ack delay.
PeerConfigPtr getPeerConfig(const std::string &name) const
Returns configuration of the specified server.
void setHeartbeatDelay(const uint32_t heartbeat_delay)
Sets new heartbeat delay in milliseconds.
StateMachineConfig()
Constructor.
boost::shared_ptr< HAConfig > HAConfigPtr
Pointer to the High Availability configuration structure.
boost::shared_ptr< PeerConfig > PeerConfigPtr
Pointer to the server's configuration.
http::Url getUrl() const
Returns URL of the server's control channel.
StateConfigPtr getStateConfig(const int state)
Returns pointer to the state specific configuration.
void setSyncLeases(const bool sync_leases)
Sets boolean flag indicating whether the active servers should synchronize their lease databases upon...
State machine configuration information.
void setMaxUnackedClients(const uint32_t max_unacked_clients)
Set maximum number of clients which may fail to communicate with the DHCP server before entering part...
Configuration specific to a single HA state.
void setPausing(const std::string &pausing)
Sets pausing mode for the gievn state.
void setHAMode(const std::string &ha_mode)
Sets new mode of operation.
void setUrl(const http::Url &url)
Sets server's URL.
uint32_t getSyncTimeout() const
Returns timeout for lease database synchronization.
void setMaxResponseDelay(const uint32_t max_response_delay)
Sets new max response delay.
PeerConfigPtr getFailoverPeerConfig() const
Returns configuration of the partner which takes part in failover.
PeerConfigPtr selectNextPeerConfig(const std::string &name)
Creates and returns pointer to the new peer's configuration.
uint32_t max_response_delay_
Max delay in response to heartbeats.
Role
Server's role in the High Availability setup.
static std::string roleToString(const HAConfig::PeerConfig::Role &role)
Returns role name.
static Role stringToRole(const std::string &role)
Decodes role provided as a string.