Skip to content

Latest commit

 

History

History
532 lines (287 loc) · 11.6 KB

REFERENCE.md

File metadata and controls

532 lines (287 loc) · 11.6 KB

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • memcached::instance::servicefile: helper class to configure the memcache multiinstance unit file once

Defined types

Functions

Classes

memcached

This class manages memcached

Examples

Use default settings
include memcached

Parameters

The following parameters are available in the memcached class:

package_ensure

Data type: Enum['present', 'latest', 'absent']

Set ensure of the memcached package

Default value: 'present'

service_manage

Data type: Boolean

Manage the memcached service

Default value: true

service_flags

Data type: Optional[String]

Pass flags to the service managed by Puppet

Default value: $memcached::params::service_flags

logfile

Data type: Optional[Stdlib::Absolutepath]

Specify file to log to. Not supported on OS using systemd

Default value: $memcached::params::logfile

logstdout

Data type: Boolean

Disable logging to a file or syslog entirely. Only supported on RedHat-based OS and Suse

Default value: false

syslog

Data type: Boolean

Log to syslog. Only supported on RedHat-based OS and Suse

Default value: false

pidfile

Data type: Variant[Stdlib::Absolutepath, Boolean[false], Undef]

Save pid in file

Default value: $memcached::params::pidfile

manage_firewall

Data type: Boolean

Create simple firewall rules. Only supported on Linux

Default value: false

max_memory

Data type: String[1]

Max memory memcached should use to store items. Either in percent or mb

Default value: '95%'

max_item_size

Data type: Optional[Variant[Integer, String]]

Adjusts max item size

Default value: undef

min_item_size

Data type: Optional[Variant[Integer, String]]

Min space used for key+value+flags

Default value: undef

factor

Data type: Optional[Variant[Integer, String]]

Chunk size growth factor

Default value: undef

lock_memory

Data type: Boolean

Lock down all paged memory

Default value: false

listen

Data type: Optional[Variant[String,Array[String]]]

Interface to listen on

Default value: undef

listen_ip

Data type: Optional[Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address]]]

Deprecated. Use listen instead

Default value: undef

tcp_port

Data type: Integer

TCP port to listen on

Default value: 11211

udp_port

Data type: Integer

UDP port to listen on

Default value: 0

user

Data type: String

User to run memcached service as

Default value: $memcached::params::user

max_connections

Data type: Integer

Max simultaneous connections

Default value: 8192

verbosity

Data type: Optional[Enum['v', 'vv', 'vvv']]

v: verbose (print errors/warnings while in event loop) vv: very verbose (also print client commands/responses) vvv: extremely verbose (internal state transitions)

Default value: undef

unix_socket

Data type: Optional[String]

UNIX socket to listen on (disables network support)

Default value: undef

unix_socket_mask

Data type: String

access mask for UNIX socket, in octal

Default value: '0755'

install_dev

Data type: Boolean

Manage installation of the memcached dev package

Default value: false

processorcount

Data type: Variant[String,Integer]

Number of threads to use

Default value: $facts['processors']['count']

service_restart

Data type: Boolean

Whether or not to restart the memcached service on changes

Default value: true

auto_removal

Data type: Boolean

Return error on memory exhausted instead of evicting

Default value: false

use_sasl

Data type: Boolean

Turn on SASL authentication

Default value: false

use_tls

Data type: Boolean

Enable TLS/SSL

Default value: false

tls_cert_chain

Data type: Optional[Stdlib::Absolutepath]

Path to certificate chain file

Default value: undef

tls_key

Data type: Optional[Stdlib::Absolutepath]

Path to certificate key file

Default value: undef

tls_ca_cert

Data type: Optional[Stdlib::Absolutepath]

Path to CA certificate file

Default value: undef

tls_verify_mode

Data type: Integer[0,3]

Peer certificate verify mode

Default value: 1

use_registry

Data type: Boolean

Default value: $memcached::params::use_registry

registry_key

Data type: String

Default value: 'HKLM\System\CurrentControlSet\services\memcached\ImagePath'

large_mem_pages

Data type: Boolean

Try to use large memory pages (if available)

Default value: false

use_svcprop

Data type: Boolean

Default value: $memcached::params::use_svcprop

svcprop_fmri

Data type: String

Default value: 'memcached:default'

svcprop_key

Data type: String

Default value: 'memcached/options'

extended_opts

Data type: Optional[Array[String]]

Array of extended options

Default value: undef

config_tmpl

Data type: String

Use a different config template

Default value: $memcached::params::config_tmpl

disable_cachedump

Data type: Boolean

Disable stats cachedump and lru_crawler metadump

Default value: false

max_reqs_per_event

Data type: Optional[Integer]

Maximum number of requests per event, limits the requests processed per connection to prevent starvation

Default value: undef

disable_flush_all

Data type: Boolean

Disable flush_all command

Default value: false

disable_watch

Data type: Boolean

Disable watch commands (live logging)

Default value: false

memory_file

Data type: Optional[Stdlib::Absolutepath]

mmap a file for item memory.

Default value: undef

memcached::params

== Class: memcached::params

Defined types

memcached::instance

Manage multiple memcached instances

Parameters

The following parameters are available in the memcached::instance defined type:

manage_firewall

Data type: Boolean

enable/disable fireall management via puppetlabs/firewall

Default value: false

port

Data type: Stdlib::Port::Unprivileged

the udp and tcp port to listen on. By default, the instance name is used

Default value: Integer($name)

limits

Data type: Optional[Systemd::ServiceLimits]

systemd limits for the service

Default value: undef

override_content

Data type: Optional[String[1]]

overrides for the unit, as string

Default value: undef

override_source

Data type: Optional[Stdlib::Filesource]

overrides for the unit, as file resource

Default value: undef

Functions

memcached::max_memory

Type: Ruby 4.x API

Calculate max_memory size from fact 'memsize' and passed argument.

memcached::max_memory(Any $arg)

Calculate max_memory size from fact 'memsize' and passed argument.

Returns: Integer

arg

Data type: Any