Added pools class and tests

Small changes in loadbalancer configuration
This commit is contained in:
Martijn Smidt
2019-05-13 16:49:32 +02:00
parent 3cfeedbe4d
commit 99c174bcb3
14 changed files with 622 additions and 38 deletions

View File

@@ -28,9 +28,9 @@ class LoadBalancer implements Configurations
return $this->configs['name'] ?? '';
}
public function setDefaultPools(array $default_pools)
public function setDefaultPools(array $defaultPools)
{
$this->configs['default_pools'] = $default_pools;
$this->configs['default_pools'] = $defaultPools;
}
public function getDefaultPools():array
@@ -83,12 +83,7 @@ class LoadBalancer implements Configurations
return !$this->configs['enabled'] ?? false;
}
public function setEnabled(bool $enabled = true)
{
$this->configs['enabled'] = $enabled;
}
public function getEnabled(bool $enabled = true):bool
public function getEnabled():bool
{
return $this->configs['enabled'] ?? true;
}
@@ -147,9 +142,14 @@ class LoadBalancer implements Configurations
return $this->configs['description'] ?? '';
}
public function setProxied(bool $proxied = true)
public function enableProxied()
{
$this->configs['proxied'] = $proxied;
$this->configs['proxied'] = true;
}
public function disableProxied()
{
$this->configs['proxied'] = false;
}
public function isProxied():bool