1.8 KiB
Drivers
The driver is the part of the Worker which is responsible for doing actions towards the underlying service like HAProxy or other.
It's a plugin based python class that has a generic API for
configuring up device
.
LoadBalancerDriver Class
See Drivers for driver documentation
This defines the API for interacting with various load balancing appliances. Drivers for these appliances should inherit from this class and implement the relevant API methods that it can support. This is an abstract class and is not meant to be instantiated directly.
Generally, an appliance driver should queue up any configuration changes made via these API calls until the :py
create
method is called. The :pysuspend
, :pyenable
, :pydelete
, :pyget_stats()
and :pyarchive
methods should take immediate action.
Known Load Balancer Drivers Dictionary
This is the dictionary that maps values for the
--driver <libra_worker.py --driver>
option to a class implementing the driver :py~LoadBalancerDriver
API for that appliance. After implementing a new driver class, you simply add a new entry to this dictionary to plug in the new driver.
Note
See below for driver specific documentation
drivers/*