public ActionResult HAProxyAdminProxy(string group, string proxy, string server, HAProxyAdmin.Action act) { var haGroup = HAProxyGroup.GetGroup(group); var proxies = (haGroup != null ? haGroup.GetProxies() : HAProxyGroup.GetAllProxies()).Where(pr => pr.Name == proxy); return Json(HAProxyAdmin.PerformProxyAction(proxies, server, act)); }
public HAProxyModule(IOptions <HAProxySettings> settings) : base(settings) { var snapshot = settings.Value; Groups = snapshot.Groups.Select(g => new HAProxyGroup(this, g)) .Union(snapshot.Instances.Select(c => new HAProxyGroup(this, c))) .ToList(); Admin = new HAProxyAdmin(this); }
public ActionResult HAProxyAdminGroup(string group, HAProxyAdmin.Action act) { return Json(HAProxyAdmin.PerformGroupAction(group, act)); }
public ActionResult HAProxyAdminServer(string server, HAProxyAdmin.Action act) { return Json(HAProxyAdmin.PerformServerAction(server, act)); }
public Task <bool> DisableAsync(string node) => HAProxyAdmin.PerformServerActionAsync(node, Action.Drain);
public Task <bool> EnableAsync(string node) => HAProxyAdmin.PerformServerActionAsync(node, Action.Ready);