mirror of
https://github.com/graygnuorg/pound.git
synced 2026-10-23 22:28:53 +03:00
This is the result of running: codespell --ignore-words-list ans,clos,PARM,Parm,ABD,raison,TE,fo,varius,pres --skip ChangeLog.sed --write-changes
56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
@c This file is part of the pound manual.
|
|
@c Copyright (C) 2024--2026 Sergey Poznyakoff
|
|
@c This file is distributed under GFDL 1.3 or any later version
|
|
@c published by the Free Software Foundation.
|
|
|
|
Prior to version 4.18, JSON output from @command{pound} control
|
|
interface differed from the current format (@pxref{Input object})
|
|
in several important aspects:
|
|
|
|
@enumerate 1
|
|
@item
|
|
Objects didn't carry the @code{kind} attribute.
|
|
|
|
@item
|
|
The @dfn{full listing} object incorporated attributes from the
|
|
@dfn{core} listing directly, instead of storing them under the
|
|
@code{core} attribute.
|
|
|
|
@item
|
|
The @dfn{core listing} object lacked @code{uptime} attribute.
|
|
@end enumerate
|
|
|
|
In the absence of explicit indication of the object type being passed
|
|
(see pt. 1 above), templates were using an heuristics based on the
|
|
presence or absence of certain attribute to deduce the object type in
|
|
question. This heuristic is described in the following pseudo-code
|
|
fragment:
|
|
|
|
@example
|
|
@group
|
|
@{@{if exists . "listeners" @}@}
|
|
@{@{/* This is a full listing, as requested by @command{poundctl list}. */@}@}
|
|
...
|
|
@{@{else if exists . "services"@}@}
|
|
@{@{/* Single listener, as requested by @command{poundctl list /@var{L}}.
|
|
Notice that this attribute is present in the full listing as
|
|
well, so presence of "listeners" should be checked first. */@}@}
|
|
...
|
|
@{@{else if exists . "backends"@}@}
|
|
@{@{/* Single service, as requested by @command{poundctl list /@var{L}/@var{S}}. */@}@}
|
|
...
|
|
@{@{else if exists . "pid"@}@}
|
|
@{@{/* Core statistics (@command{poundctl core}) */@}@}
|
|
...
|
|
@{@{else@}@}
|
|
@{@{/* Backend listing (@command{poundctl list /@var{L}/@var{I}/@var{B}}) */@}@}
|
|
...
|
|
@{@{end@}@}
|
|
@end group
|
|
@end example
|
|
|
|
For backward compatibility, template file shipped with
|
|
@command{pound} version @value{VERSION} checks whether @code{kind}
|
|
attribute is present, and if it is not, falls back to using the
|
|
heuristics above.
|