Puppet Function: profile::mcrouter_route

Defined in:
modules/profile/functions/mcrouter_route.pp
Function type:
Puppet Language

Overview

profile::mcrouter_route(String $region, Integer $ttl)Variant[Hash, String]

Parameters:

  • region (String)
  • ttl (Integer)

Returns:



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'modules/profile/functions/mcrouter_route.pp', line 1

function profile::mcrouter_route(String $region, Integer $ttl) >> Variant[Hash, String] {
    # For remote sites, the route is always the simple "PoolRoute|${region}"
    if ($region != $::site) {
        "PoolRoute|${region}"
    }
    else {
        {
            'type' => 'FailoverWithExptimeRoute',
            'normal' => "PoolRoute|${region}",
            'failover' => 'PoolRoute|gutter',
            'failover_exptime' => $ttl,
            'failover_errors' => ['tko']

        }
    }
}