|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Rabbitmq
|
|
Packit Service |
a2ae7a |
Parses Rabbitmq configuration files
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Raphael Pinson <raphael.pinson@camptocamp.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
This lens tries to keep as close as possible to `http://www.rabbitmq.com/configure.html` where possible.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: License
|
|
Packit Service |
a2ae7a |
This file is licenced under the LGPL v2+, like the rest of Augeas.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Lens Usage
|
|
Packit Service |
a2ae7a |
To be documented
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to Rabbitmq configuration files. See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_Rabbitmq> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
module Rabbitmq =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: listeners
|
|
Packit Service |
a2ae7a |
A tcp/ssl listener *)
|
|
Packit Service |
a2ae7a |
let listeners =
|
|
Packit Service |
a2ae7a |
let value = Erlang.make_value Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.tuple Erlang.quoted Erlang.integer
|
|
Packit Service |
a2ae7a |
in Erlang.list /(tcp|ssl)_listeners/ value
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: ssl_options
|
|
Packit Service |
a2ae7a |
(Incomplete) list of SSL options *)
|
|
Packit Service |
a2ae7a |
let ssl_options =
|
|
Packit Service |
a2ae7a |
let versions_list = Erlang.opt_list (Erlang.make_value Erlang.quoted)
|
|
Packit Service |
a2ae7a |
in let option = Erlang.value /((ca)?cert|key)file/ Erlang.path
|
|
Packit Service |
a2ae7a |
| Erlang.value "verify" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "verify_fun" Erlang.boolean
|
|
Packit Service |
a2ae7a |
| Erlang.value /fail_if_no_peer_cert|reuse_sessions/ Erlang.boolean
|
|
Packit Service |
a2ae7a |
| Erlang.value "depth" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value "password" Erlang.quoted
|
|
Packit Service |
a2ae7a |
| Erlang.value "versions" versions_list
|
|
Packit Service |
a2ae7a |
in Erlang.list "ssl_options" option
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: disk_free_limit *)
|
|
Packit Service |
a2ae7a |
let disk_free_limit =
|
|
Packit Service |
a2ae7a |
let value = Erlang.integer | Erlang.tuple Erlang.bare Erlang.decimal
|
|
Packit Service |
a2ae7a |
in Erlang.value "disk_free_limit" value
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: log_levels *)
|
|
Packit Service |
a2ae7a |
let log_levels =
|
|
Packit Service |
a2ae7a |
let category = Erlang.tuple Erlang.bare Erlang.bare
|
|
Packit Service |
a2ae7a |
in Erlang.list "log_levels" category
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: cluster_nodes
|
|
Packit Service |
a2ae7a |
Can be a tuple `(nodes, node_type)` or simple `nodes` *)
|
|
Packit Service |
a2ae7a |
let cluster_nodes =
|
|
Packit Service |
a2ae7a |
let nodes = Erlang.opt_list (Erlang.make_value Erlang.quoted)
|
|
Packit Service |
a2ae7a |
in let value = Erlang.tuple nodes Erlang.bare
|
|
Packit Service |
a2ae7a |
| nodes
|
|
Packit Service |
a2ae7a |
in Erlang.value "cluster_nodes" value
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: cluster_partition_handling
|
|
Packit Service |
a2ae7a |
Can be single value or
|
|
Packit Service |
a2ae7a |
`{pause_if_all_down, [nodes], ignore | autoheal}` *)
|
|
Packit Service |
a2ae7a |
let cluster_partition_handling =
|
|
Packit Service |
a2ae7a |
let nodes = Erlang.opt_list (Erlang.make_value Erlang.quoted)
|
|
Packit Service |
a2ae7a |
in let value = Erlang.tuple3 Erlang.bare nodes Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.bare
|
|
Packit Service |
a2ae7a |
in Erlang.value "cluster_partition_handling" value
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: tcp_listen_options *)
|
|
Packit Service |
a2ae7a |
let tcp_listen_options =
|
|
Packit Service |
a2ae7a |
let value = Erlang.make_value Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.tuple Erlang.bare Erlang.bare
|
|
Packit Service |
a2ae7a |
in Erlang.list "tcp_listen_options" value
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: parameters
|
|
Packit Service |
a2ae7a |
Top-level parameters for the lens *)
|
|
Packit Service |
a2ae7a |
let parameters = listeners
|
|
Packit Service |
a2ae7a |
| ssl_options
|
|
Packit Service |
a2ae7a |
| disk_free_limit
|
|
Packit Service |
a2ae7a |
| log_levels
|
|
Packit Service |
a2ae7a |
| Erlang.value /vm_memory_high_watermark(_paging_ratio)?/ Erlang.decimal
|
|
Packit Service |
a2ae7a |
| Erlang.value "frame_max" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value "heartbeat" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value /default_(vhost|user|pass)/ Erlang.glob
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "default_user_tags" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "default_permissions" Erlang.glob
|
|
Packit Service |
a2ae7a |
| cluster_nodes
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "server_properties" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "collect_statistics" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "collect_statistics_interval" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "auth_mechanisms" Erlang.quoted
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "auth_backends" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "delegate_count" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "trace_vhosts" Erlang.bare
|
|
Packit Service |
a2ae7a |
| tcp_listen_options
|
|
Packit Service |
a2ae7a |
| Erlang.value "hipe_compile" Erlang.boolean
|
|
Packit Service |
a2ae7a |
| Erlang.value "msg_store_index_module" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "backing_queue_module" Erlang.bare
|
|
Packit Service |
a2ae7a |
| Erlang.value "msg_store_file_size_limit" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value /queue_index_(max_journal_entries|embed_msgs_below)/ Erlang.integer
|
|
Packit Service |
a2ae7a |
| cluster_partition_handling
|
|
Packit Service |
a2ae7a |
| Erlang.value /(ssl_)?handshake_timeout/ Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value "channel_max" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value_list "loopback_users" Erlang.glob
|
|
Packit Service |
a2ae7a |
| Erlang.value "reverse_dns_lookups" Erlang.boolean
|
|
Packit Service |
a2ae7a |
| Erlang.value "cluster_keepalive_interval" Erlang.integer
|
|
Packit Service |
a2ae7a |
| Erlang.value "mnesia_table_loading_timeout" Erlang.integer
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: rabbit
|
|
Packit Service |
a2ae7a |
The rabbit <Erlang.application> config *)
|
|
Packit Service |
a2ae7a |
let rabbit = Erlang.application "rabbit" parameters
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns
|
|
Packit Service |
a2ae7a |
A top-level <Erlang.config> *)
|
|
Packit Service |
a2ae7a |
let lns = Erlang.config rabbit
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/rabbitmq/rabbitmq.config"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|