enrich

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 stops the workers (idempotent).

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