diff --git a/src/BrancherServer.php b/src/BrancherServer.php index 87171a8..c877a6a 100644 --- a/src/BrancherServer.php +++ b/src/BrancherServer.php @@ -35,4 +35,34 @@ public function setSettings(array $settings): self $this->setOption(self::OPTION_HN_BRANCHER_SETTINGS, $settings); return $this; } + + /** + * @param int $timeout Maximum time in seconds to wait for brancher availability + * @return $this + */ + public function setBrancherTimeout(int $timeout): self + { + $this->setOption(self::OPTION_HN_BRANCHER_TIMEOUT, $timeout); + return $this; + } + + /** + * @param int $count Number of consecutive successful reachability checks required + * @return $this + */ + public function setBrancherReachabilityCheckCount(int $count): self + { + $this->setOption(self::OPTION_HN_BRANCHER_REACHABILITY_CHECK_COUNT, $count); + return $this; + } + + /** + * @param int $seconds Seconds between reachability checks + * @return $this + */ + public function setBrancherReachabilityCheckInterval(int $seconds): self + { + $this->setOption(self::OPTION_HN_BRANCHER_REACHABILITY_CHECK_INTERVAL, $seconds); + return $this; + } } diff --git a/src/Server.php b/src/Server.php index c7329bc..66c94cb 100644 --- a/src/Server.php +++ b/src/Server.php @@ -10,6 +10,9 @@ class Server public const OPTION_HN_BRANCHER = 'hn_brancher'; public const OPTION_HN_BRANCHER_LABELS = 'hn_brancher_labels'; public const OPTION_HN_BRANCHER_SETTINGS = 'hn_brancher_settings'; + public const OPTION_HN_BRANCHER_TIMEOUT = 'hn_brancher_timeout'; + public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_COUNT = 'hn_brancher_reachability_check_count'; + public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_INTERVAL = 'hn_brancher_reachability_check_interval'; public const OPTION_HN_PARENT_APP = 'hn_parent_app'; /**