public HttpClusterApi() { DefaultNode = new ApiNode("*"); DetectionTime = 2000; mDetectionTimer = new System.Threading.Timer(OnVerifyClients, null, DetectionTime, DetectionTime); }
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; return node; }
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); }