Use native path readers for discovery
This commit is contained in:
@@ -80,11 +80,19 @@ type ExplanationReader interface {
|
||||
Explain(configkit.Path) (configkit.Explanation, bool)
|
||||
}
|
||||
|
||||
// PathReader supplies native candidates for configuration path discovery.
|
||||
type PathReader interface {
|
||||
HistoricalPaths() []configkit.Path
|
||||
}
|
||||
|
||||
// View exposes native configuration evidence used to build reports.
|
||||
type View struct {
|
||||
Effective EffectiveWriter
|
||||
Sources SourceReader
|
||||
Explanation ExplanationReader
|
||||
// Paths supplies discovery candidates. When nil, discovery uses Metadata.
|
||||
// A nonnil reader may return an empty list without triggering that fallback.
|
||||
Paths PathReader
|
||||
// Metadata supplies native configuration path metadata when available.
|
||||
Metadata *configkit.Metadata
|
||||
// Findings supplies native diagnostics and their ordinary presentations.
|
||||
@@ -102,7 +110,8 @@ type Findings struct {
|
||||
|
||||
// ScopeFeatures describes optional modes within configuration operations.
|
||||
type ScopeFeatures struct {
|
||||
// PathDiscovery indicates support for metadata-backed path discovery.
|
||||
// PathDiscovery indicates support for path discovery using Paths or, when
|
||||
// absent, Metadata. Metadata is required to describe and filter candidates.
|
||||
PathDiscovery bool
|
||||
// PathShow indicates support for displaying a selected effective path.
|
||||
PathShow bool
|
||||
|
||||
Reference in New Issue
Block a user