예제 #1
0
 public HAProxyGroup(HAProxyModule module, HAProxySettings.Group group)
 {
     Module    = module;
     Settings  = group;
     Instances = group.Instances.Select(i => new HAProxyInstance(module, i, group)
     {
         Group = this
     }).ToList();
     Instances.ForEach(i => i.TryAddToGlobalPollers());
 }
예제 #2
0
 /// <summary>
 /// Creates a single instance group for consistent management at a higher level.
 /// </summary>
 /// <param name="instance">The <see cref="HAProxyInstance"/> to create a single-item group for.</param>
 public HAProxyGroup(HAProxyModule module, HAProxySettings.Instance instance)
 {
     Module   = module;
     Settings = new HAProxySettings.Group
     {
         Name        = instance.Name,
         Description = instance.Description
     };
     Instances = new List <HAProxyInstance>
     {
         new HAProxyInstance(module, instance)
         {
             Group = this
         }
     };
     Instances.ForEach(i => i.TryAddToGlobalPollers());
 }
예제 #3
0
 public HAProxyAdmin(HAProxyModule module)
 {
     Module = module;
 }