Documentation
¶
Overview ¶
Package enrich is the engine-side (non-AI) asset auto-completion layer described in docs/资产模型与自动关联设计.md §5: an async worker pool that resolves domains (dnsx) and probes web assets (HTTP, through the recording proxy) and writes the results back into the asset graph — creating IP/port nodes, resolves/exposes edges, and filling attrs.dns / attrs.http. DNS is ungated; HTTP probing is gated by RoE (§5.2).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine owns the resolver, the proxy-routed HTTP client, and the worker pool.
func New ¶
func New(as *db.AssetStore, proxy func() string, workers int) *Engine
New builds the engine. proxy() returns the recording-proxy address to route HTTP probes through (so they land in the traffic store), evaluated per request so the runtime traffic-capture toggle takes effect live; "" = direct. Returns a usable engine even if the resolver fails to init (DNS becomes a no-op).
func (*Engine) Close ¶
func (e *Engine) Close()
Close cancels HTTP probes and joins workers before their database is closed.
func (*Engine) ProbeSite ¶
ProbeSite enqueues an HTTP probe for a web-asset (site). rawURL is the site URL.
func (*Engine) ResolveDomain ¶
ResolveDomain enqueues a DNS resolution for a domain asset (ungated). host is the FQDN. No-op for an empty engine.