Puppet Function: query_service::get_federated_endpoint_hostnames
- Defined in:
- modules/query_service/functions/get_federated_endpoint_hostnames.pp
- Function type:
- Puppet Language
Overview
SPDX-License-Identifier: Apache-2.0 Return the list of hostnames from the definition of internal federated endpoints
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'modules/query_service/functions/get_federated_endpoint_hostnames.pp', line 3
function query_service::get_federated_endpoint_hostnames(
Optional[Hash[Stdlib::HTTPSUrl, Array[Stdlib::HTTPSUrl]]] $endpoints) >> Optional[String]
{
if $endpoints and $endpoints != {} {
$internal_federated_hosts = $endpoints.keys.map |$u| {
$u ? {
/^https:\/\/([^\/:]+)[:\/]?/ => $1,
default => fail("Unparseable URL ${u}")
}
}.join(',')
} else {
$internal_federated_hosts = undef
}
$internal_federated_hosts
}
|