class

Detector::Specification::Envoy

Inherits Detector < Reference < Object

Constants

DOMAINS_MARKER = /domains/
MAX_SEARCH_DEPTH = 32

Envoy puts virtual_hosts at whatever depth the surrounding message implies: at the document root for a standalone RouteConfiguration, one level down under route_config, inside resources[] for an RDS response, and — by far the most common in practice — buried under static_resources.listeners[].filter_chains[].filters[].typed_config. route_config in a bootstrap config. Searching the document instead of enumerating layouts is what lets a plain envoy.yaml be recognised at all. The bound only exists so a pathologically nested document can't blow the stack; real configs sit around depth 8.

VIRTUAL_HOSTS_KEY = YAML::Any.new("virtual_hosts")

Hoisted so the per-node lookup in the walk below does not rebuild the wrapper on every mapping it visits.

VIRTUAL_HOSTS_MARKER = /virtual_hosts/

Every .yaml/.yml/.json in the tree reaches these gates.

Class methods

tech_name

The tech name without needing an instance, so the registry can be read off the classes themselves rather than from a parallel list.

Source

Instance methods

applicable?(filename : String) : Bool

Registers every matching config path in CodeLocator.

Source
detect(filename : String, file_contents : String) : Bool
Source
idempotent?

Registers every matching config path in CodeLocator.

Source
set_name

Registers every matching config path in CodeLocator.

Source