Puppet Function: profile::mcrouter_pools
- Defined in:
-
modules/profile/functions/mcrouter_pools.pp
- Function type:
- Puppet Language
Overview
profile::mcrouter_pools(String $region, Hash $servers) ⇒ Hash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'modules/profile/functions/mcrouter_pools.pp', line 1
function profile::mcrouter_pools(String $region, Hash $servers) >> Hash {
{
$region => {
'servers' => $servers.map |$shard_slot, $address| {
if $address['socket'] {
"unix:${$address['socket']}:ascii:plain"
} elsif $address['ssl'] == true {
"${address['host']}:${address['port']}:ascii:ssl"
} else {
"${address['host']}:${address['port']}:ascii:plain"
}
}
}
}
}
|