Documentation
¶
Overview ¶
Package sectionextract extracts standard (Community Edition) HAProxy sections from a client-native config-parser into a parserconfig.StructuredConfig.
The logic here is edition- and version-agnostic: it operates purely on the config-parser.Parser interface, so both the CE parser (pkg/dataplane/parser) and the Enterprise parser (pkg/dataplane/parser/enterprise) share it verbatim for their CE-section pass. Enterprise-specific sections and directives layer on top in the enterprise package; nothing in this package knows about them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All(p parser.Parser, conf *parserconfig.StructuredConfig) error
All extracts every standard HAProxy section from p into conf, in the order the sections must be assembled. conf must already be initialised (its pointer indexes allocated) via parserconfig.NewStructuredConfig.
The error-wrapping here is the single source of truth for both parsers: a section whose returning-parse fails aborts extraction with a wrapped error, while sections parsed best-effort (frontends, backends, peers, resolvers, mailers, userlists) log and skip individual failures via logSectionParseError.
Types ¶
This section is empty.