class
Detector::Specification::Envoy
- Detector::Specification::Envoy
- Detector
- Reference
- Object
Defined in:
detector/detectors/specification/envoy.crConstant Summary
-
DOMAINS_MARKER =
/domains/ -
MAX_SEARCH_DEPTH =
32 -
Envoy puts
virtual_hostsat whatever depth the surrounding message implies: at the document root for a standalone RouteConfiguration, one level down underroute_config, insideresources[]for an RDS response, and — by far the most common in practice — buried understatic_resources.listeners[].filter_chains[].filters[].typed_config. route_configin a bootstrap config. Searching the document instead of enumerating layouts is what lets a plainenvoy.yamlbe 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/.jsonin the tree reaches these gates.
Class Method Summary
-
.tech_name : String
The tech name without needing an instance, so the registry can be read off the classes themselves rather than from a parallel list.
Instance Method Summary
-
#applicable?(filename : String) : Bool
Registers every matching config path in CodeLocator.
- #detect(filename : String, file_contents : String) : Bool
-
#idempotent? : Bool
Registers every matching config path in CodeLocator.
-
#set_name
Registers every matching config path in CodeLocator.
Instance methods inherited from class Detector
applicable?(filename : String) : Bool
applicable?,
base_relative_path(filename : String) : String
base_relative_path,
content_matches?(file_contents : String, markers : Regex) : Bool
content_matches?,
detect(filename : String, file_contents : String) : Bool
detect,
gemfile_dependency?(file_contents : String, gem_name : String) : Bool
gemfile_dependency?,
gemspec_dependency?(file_contents : String, gem_name : String) : Bool
gemspec_dependency?,
idempotent? : Bool
idempotent?,
logger : NoirLogger
logger,
name : String
name,
path_sensitive? : Bool
path_sensitive?
Constructor methods inherited from class Detector
new(options : Hash(String, YAML::Any))
new
Macros inherited from class Detector
detector_for(tech, extensions = nil, basenames = nil, path_segments = nil, idempotent = nil)
detector_for
Class Method Detail
The tech name without needing an instance, so the registry can be read off the classes themselves rather than from a parallel list.
Instance Method Detail
Registers every matching config path in CodeLocator.