def __init__(self, name, scale_manager, config): LoadBalancerConnection.__init__(self, name, scale_manager) self.tracked = {} self.config = NginxLoadBalancerConfig(config) template_file = os.path.join(os.path.dirname(__file__), 'nginx.template') self.template = Template(filename=template_file) self.log_reader = NginxLogWatcher("/var/log/nginx/access.log") self.log_reader.start()
def __init__(self, name, scale_manager, config): LoadBalancerConnection.__init__(self, name, scale_manager) self.portmap = {} self.tracked = {} self.active = {} self.config = TcpLoadBalancerConfig(config) self.producer = ConnectionProducer() self.producer.start() self.consumer = ConnectionConsumer(self, self.producer, self.config.exclusive()) self.consumer.start()
def __init__(self, name, scale_manager, config): LoadBalancerConnection.__init__(self, name, scale_manager) self.config = DnsmasqLoadBalancerConfig(config) template_file = os.path.join(os.path.dirname(__file__),'dnsmasq.template') self.template = Template(filename=template_file) self.ipmappings = {}