-- dispatch version 0.1 -- coding by blueant require 'io'; require 'cibn.tool'; require 'cibn.dictionary'; require 'cibn.base'; require 'cibn.dbase'; require 'cibn.ring'; ipfile = '/usr/local/openresty/nginx/conf/lua/ip'; ispfile = '/usr/local/openresty/nginx/conf/lua/isp2node'; slistfile = '/usr/local/openresty/nginx/conf/lua/serverlist'; specfile = '/usr/local/openresty/nginx/conf/lua/specdomain'; -- read config file of ip ipcontents = {}; ipcontents = base.readconts(ipfile); ip2zone = dictionary.dict(); ip2zone = base.init_ip2zone(ipcontents); -- read config file of isp2node ispcontents = {}; ispcontents = base.readconts(ispfile); isp2node = dictionary.dict(); isp2flag = dictionary.dict(); isp2flag, isp2node = base.init_isp2node(ispcontents); -- read config file of serverlist flags = dictionary.dict(); points = dictionary.dict(); rings = dictionary.dict(); singles = dictionary.dict(); loops = dictionary.dict(); slistcontents = {}; slistcontents = base.readconts(slistfile); flags, points, rings, singles, loops = base.init_slist(slistcontents); -- read config file of yesten's multi domain speccontents = {}; speccontents = base.readconts(specfile); specnode, dom2node = base.init_spec(speccontents);