1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'modules/profile/functions/mcrouter_route.pp', line 1
function profile::mcrouter_route(String $dc, Integer $ttl, Boolean $failover_route) >> Variant[Hash, String] {
# For remote sites, the route is always the simple "PoolRoute|${region}"
if $failover_route {
{
'type' => 'FailoverWithExptimeRoute',
'normal' => "PoolRoute|${dc}",
'failover' => "PoolRoute|${dc}-gutter",
'failover_exptime' => $ttl,
'failover_errors' => ['tko']
}
} else {
"PoolRoute|${dc}"
}
}
|