.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Tirex::Renderer 3pm"
.TH Tirex::Renderer 3pm "2023-04-11" "perl v5.36.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Tirex::Renderer \- A Tirex renderer config
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
my \f(CW$r\fR = Tirex::Renderer\->new( ... );
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Tirex can work with several rendering backends such as Mapnik or \s-1WMS.\s0  A
backend can be started with different configurations, for the Mapnik backend
you need to configure the font directory for instance. This class defines
methods for reading the config files (/etc/tirex/renderer/*.conf) describing
the backend configurations and managing those renderers.
.PP
See the class Tirex::Backend and its subclasses for the actual code of
some backends.
.SH "METHODS"
.IX Header "METHODS"
.SS "Tirex::Renderer\->read_config_dir($dir)"
.IX Subsection "Tirex::Renderer->read_config_dir($dir)"
Read all renderer configs in given config directory.
.SS "Tirex::Renderer\->get('foo')"
.IX Subsection "Tirex::Renderer->get('foo')"
Get renderer by name.
.SS "Tirex::Renderer\->\fBall()\fP;"
.IX Subsection "Tirex::Renderer->all();"
Return sorted (by name) list of all configured renderers.
.SS "Tirex::Renderer\->\fBclear()\fP;"
.IX Subsection "Tirex::Renderer->clear();"
Clear list of renderers.
.SS "Tirex::Renderer\->\fBenabled()\fP;"
.IX Subsection "Tirex::Renderer->enabled();"
Return sorted (by name) list of all enabled renderers.
.SS "Tirex::Renderer\->new( name => 'foo', path => '/path/to/exec', port => 1234, procs => 3, ... )"
.IX Subsection "Tirex::Renderer->new( name => 'foo', path => '/path/to/exec', port => 1234, procs => 3, ... )"
Create new renderer config.
.PP
Every renderer has at least these general options: name, path, port, and
procs. Will croak if they are not all present.
.PP
In addition it can have zero or more options specific to this renderer.
.PP
Will croak if a renderer configuration already exists under the same name.
.SS "Tirex::Renderer\->new_from_configfile($filename)"
.IX Subsection "Tirex::Renderer->new_from_configfile($filename)"
Create new renderer config from a file.
.PP
Croaks if the file does not exist.
.ie n .SS "$rend\->\fBread_map_config()\fP"
.el .SS "\f(CW$rend\fP\->\fBread_map_config()\fP"
.IX Subsection "$rend->read_map_config()"
Read all map configs for this renderer.
.ie n .SS "$rend\->\fBget_maps()\fP"
.el .SS "\f(CW$rend\fP\->\fBget_maps()\fP"
.IX Subsection "$rend->get_maps()"
Get array of map configs for this renderer.
.ie n .SS "$rend\->\fBget_config()\fP"
.el .SS "\f(CW$rend\fP\->\fBget_config()\fP"
.IX Subsection "$rend->get_config()"
Return hash with renderer-specific configuration.
.ie n .SS "$rend\->\fBget_name()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_name()\fP;"
.IX Subsection "$rend->get_name();"
Get name of this renderer.
.ie n .SS "$rend\->\fBget_debug()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_debug()\fP;"
.IX Subsection "$rend->get_debug();"
Get debug flag of this renderer.
.ie n .SS "$rend\->\fBget_path()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_path()\fP;"
.IX Subsection "$rend->get_path();"
Get path of this renderer.
.ie n .SS "$rend\->\fBget_port()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_port()\fP;"
.IX Subsection "$rend->get_port();"
Get port of this renderer.
.ie n .SS "$rend\->\fBget_procs()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_procs()\fP;"
.IX Subsection "$rend->get_procs();"
Get procs of this renderer.
.ie n .SS "$rend\->\fBget_syslog_facility()\fP;"
.el .SS "\f(CW$rend\fP\->\fBget_syslog_facility()\fP;"
.IX Subsection "$rend->get_syslog_facility();"
Get syslog facility of this renderer.
.ie n .SS "$rend\->\fBis_enabled()\fP"
.el .SS "\f(CW$rend\fP\->\fBis_enabled()\fP"
.IX Subsection "$rend->is_enabled()"
Is this renderer enabled?
.ie n .SS "$rend\->\fBdisable()\fP;"
.el .SS "\f(CW$rend\fP\->\fBdisable()\fP;"
.IX Subsection "$rend->disable();"
Disable this renderer.
.ie n .SS "$rend\->\fBenable()\fP;"
.el .SS "\f(CW$rend\fP\->\fBenable()\fP;"
.IX Subsection "$rend->enable();"
Enable this renderer.
.ie n .SS "$rend\->\fBto_s()\fP;"
.el .SS "\f(CW$rend\fP\->\fBto_s()\fP;"
.IX Subsection "$rend->to_s();"
Return human readable description of this renderer.
.ie n .SS "$rend\->\fBto_hash()\fP;"
.el .SS "\f(CW$rend\fP\->\fBto_hash()\fP;"
.IX Subsection "$rend->to_hash();"
Return parameters of this renderer as hash.
.SS "Tirex::Renderer\->\fBstatus()\fP;"
.IX Subsection "Tirex::Renderer->status();"
Return status of all configured renderers.
.ie n .SS "$rend\->add_worker($pid);"
.el .SS "\f(CW$rend\fP\->add_worker($pid);"
.IX Subsection "$rend->add_worker($pid);"
Add process id to list of currently running workers.
.ie n .SS "$rend\->remove_worker($pid);"
.el .SS "\f(CW$rend\fP\->remove_worker($pid);"
.IX Subsection "$rend->remove_worker($pid);"
Remove process id from list of currently running workers.
.ie n .SS "$rend\->\fBnum_workers()\fP;"
.el .SS "\f(CW$rend\fP\->\fBnum_workers()\fP;"
.IX Subsection "$rend->num_workers();"
Return number of currently running workers.