Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/BrancherServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
3 changes: 3 additions & 0 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down