WebFramework v3.0.12
Web framework for C++.
|
Determine which server use. More...
#include <BaseLoadBalancerHeuristic.h>
Public Member Functions | |
BaseLoadBalancerHeuristic (std::string_view ip, std::string_view port, bool useHTTPS) | |
virtual uint64_t | operator() () const =0 |
Calculate load score(choose server with lowest score) | |
virtual void | onStart () |
On start event. | |
virtual void | onEnd () |
On end event. | |
const std::string & | getIp () const |
Get server ip. | |
const std::string & | getPort () const |
Get server port. | |
bool | getUseHTTPS () const |
Is server using HTTPS. | |
Determine which server use.
Definition at line 12 of file BaseLoadBalancerHeuristic.h.
framework::load_balancer::BaseLoadBalancerHeuristic::BaseLoadBalancerHeuristic | ( | std::string_view | ip, |
std::string_view | port, | ||
bool | useHTTPS ) |
Definition at line 9 of file BaseLoadBalancerHeuristic.cpp.
const string & framework::load_balancer::BaseLoadBalancerHeuristic::getIp | ( | ) | const |
const string & framework::load_balancer::BaseLoadBalancerHeuristic::getPort | ( | ) | const |
bool framework::load_balancer::BaseLoadBalancerHeuristic::getUseHTTPS | ( | ) | const |
|
virtual |
On end event.
Reimplemented in framework::load_balancer::Connections.
Definition at line 22 of file BaseLoadBalancerHeuristic.cpp.
|
virtual |
On start event.
Reimplemented in framework::load_balancer::Connections.
Definition at line 17 of file BaseLoadBalancerHeuristic.cpp.
|
pure virtual |
Calculate load score(choose server with lowest score)
Implemented in framework::load_balancer::Connections.