Simple Failover Resolver
Project description
Sfor
====
Simple failover resolver for Python
this is experimental version.
yet, you should not use in large-scale service.
Install
===
pip install sfor
Example
===
from sfor.sfor_simple import SforSimple, SforNodeInfo
import time
import logging
node_list = [
SforNodeInfo("hoge1", 80, "/status.html"),
SforNodeInfo("hoge2", 80, "/status.html"),
]
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
sfor = SforSimple(node_list)
for n in range(60):
logging.info(sfor.resolv())
time.sleep(1)
====
Simple failover resolver for Python
this is experimental version.
yet, you should not use in large-scale service.
Install
===
pip install sfor
Example
===
from sfor.sfor_simple import SforSimple, SforNodeInfo
import time
import logging
node_list = [
SforNodeInfo("hoge1", 80, "/status.html"),
SforNodeInfo("hoge2", 80, "/status.html"),
]
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
sfor = SforSimple(node_list)
for n in range(60):
logging.info(sfor.resolv())
time.sleep(1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-sfor-0.1.3.tar.gz
(1.8 kB
view hashes)