Puppet Function: profile::mcrouter_route

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

Overview

profile::mcrouter_route(String $dc, Integer $ttl, Boolean $failover_route)Variant[Hash, String]

Parameters:

  • dc (String)
  • ttl (Integer)
  • failover_route (Boolean)

Returns:



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}"
    }
}