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

Parameters:

  • region (String)
  • servers (Hash)

Returns:

  • (Hash)


1
2
3
4
5
6
7
8
9
10
11
12
13
# 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['ssl'] == true {
                    "${address['host']}:${address['port']}:ascii:ssl"
                } else {
                    "${address['host']}:${address['port']}:ascii:plain"
                }
            }
        }
    }
}