Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the core orchestrator that wires together cache, browser, analyzer, and fetcher to produce structured data from any URL.
func (*Engine) Close ¶
Close releases resources held by the engine, specifically the browser. Waits for background goroutines to complete (with timeout) before closing.
func (*Engine) Fetch ¶
func (e *Engine) Fetch(ctx context.Context, targetURL string, opts FetchOpts) (*fetcher.Result, error)
Fetch retrieves structured data from the target URL. Cache-first with priority: API schema > CSS selectors > discovery pipeline.
func (*Engine) WaitBackground ¶
func (e *Engine) WaitBackground()
WaitBackground blocks until all background goroutines (API discovery, CSS selector analysis) have completed. Call this after Fetch returns to ensure cache is populated before process exit.
type FetchOpts ¶
type FetchOpts struct {
ProxyURL string
Raw bool
HeaderOverrides map[string]string
RetryOnBrokenSchema bool
BrowserPath string
BrowserTimeout time.Duration
WaitAfterLoad time.Duration
NoBrowser bool // skip browser, use probe + LLM only
NoCache bool // skip cache read/write, always fresh discovery
Insecure bool // skip TLS certificate verification
CatalogMode bool // continue enriching API coverage for catalog output
Stealth bool // use TLS+HTTP/2 fingerprinting (set automatically from cached schema)
Cookies []string // name=value cookies to inject into browser session
OnSchemaDiscovered func(SchemaDiscovery)
}
FetchOpts configures the behavior of an engine fetch operation.
type SchemaDiscovery ¶
SchemaDiscovery describes a brand-new schema persisted during a fetch.