public HttpClusterApi() { DefaultNode = new ApiNode("*"); DetectionTime = 2000; mDetectionTimer = new System.Threading.Timer(OnVerifyClients, null, DetectionTime, DetectionTime); TimeOut = 30000; }
public ApiNode GetNode() { ApiNode result = new ApiNode(Name); foreach (var item in Hosts) { result.Add(item.Name, item.Weight); } return(result); }
private IApiNode CreateUrlNode(string url) { IApiNode node = new ApiNode(url); mNodes[node.Url] = node; ApiNodeAgent nodeAgent = new ApiNodeAgent(); nodeAgent.Node = node; nodeAgent.Url = url; mAgents[node.Url] = nodeAgent; ChangeVersion(); return(node); }