Blame lenses/pgbouncer.aug
|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Pgbouncer
|
|
Packit Service |
a2ae7a |
Parses Pgbouncer ini configuration files.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Andrew Colin Kissa <andrew@topdog.za.net>
|
|
Packit Service |
a2ae7a |
Baruwa Enterprise Edition http://www.baruwa.com
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: License
|
|
Packit Service |
a2ae7a |
This file is licensed under the LGPL v2+.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to /etc/pgbouncer.ini See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: TODO
|
|
Packit Service |
a2ae7a |
Create a tree for the database options
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Pgbouncer =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: USEFUL PRIMITIVES
|
|
Packit Service |
a2ae7a |
************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let sep = IniFile.sep "=" "="
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let eol = Util.eol
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let entry_re = ( /[A-Za-z][:#A-Za-z0-9._-]+|\*/)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: ENTRY
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let non_db_line = [ key entry_re . sep . IniFile.sto_to_eol? . eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let entry = non_db_line|comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let title = IniFile.title IniFile.record_re
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(******************************************************************
|
|
Packit Service |
a2ae7a |
* Group: LENS AND FILTER
|
|
Packit Service |
a2ae7a |
******************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let lns = IniFile.lns record comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/pgbouncer.ini"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|
|
Packit Service |
a2ae7a |
|