Help us shape the future of Go! Take the 2026 Go Developer Survey

enrich

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

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

func (e *Engine) ProbeSite(id int64, rawURL string)

ProbeSite enqueues an HTTP probe for a web-asset (site). rawURL is the site URL.

func (*Engine) ResolveDomain

func (e *Engine) ResolveDomain(id int64, host string)

ResolveDomain enqueues a DNS resolution for a domain asset (ungated). host is the FQDN. No-op for an empty engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL