mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-11 10:30:49 -04:00
This function is used for ANY=>!ANY conversions in the compatibility matrix to help differentiate between real NOOP (c_none) and pseudo conversions that are theorically supported at config parse time but can never occur at runtime,. That is, to explicit the fact that actual related runtime operations (e.g.: ANY->IPV4) are not NOOP since they might require some conversion to be performed depending on the input type. When checking the conf we don't know the effective out types so cast[pseudo type][pseudo type] is allowed in the compatibility matrix, but at runtime we only expect cast[real type][(real type || pseudo type)] because fetches and converters may not emit pseudo types, thus using c_none() everywhere was too ambiguous. The process will crash if c_pseudo() is invoked to help catch bugs: crashing here means that a pseudo type has been encountered on a converter's input at runtime (because it was emitted earlier in the chain), which is not supported and results from a broken sample fetch or converter implementation. (pseudo types may only be used as out_type in sample definitions for compatibility checks at parsing time) |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||