Give getAlmanacServiceURI() an "options" parameter to prepare for read-only devices

Summary:
Depends on D19355. Ref T10883. Ref T13120. Rather than adding a million parameters here, wrap the selector-parameters in an `$options`.

The next change adds a new "writable" option to support forcing selection of writable hosts.

Test Plan: Pulled and pushed via HTTP and SSH, viewed repositories via Diffusion.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13120, T10883

Differential Revision: https://secure.phabricator.com/D19356
This commit is contained in:
epriestley
2018-04-12 06:10:32 -07:00
parent 6f810d7813
commit 7c7e6d555b
3 changed files with 26 additions and 12 deletions

View File

@@ -431,10 +431,12 @@ final class DiffusionServeController extends DiffusionController {
$uri = $repository->getAlmanacServiceURI(
$viewer,
$is_cluster_request,
array(
'http',
'https',
'neverProxy' => $is_cluster_request,
'protocols' => array(
'http',
'https',
),
));
if ($uri) {
$future = $this->getRequest()->newClusterProxyFuture($uri);