Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector uses a Pool of headless Chromium instances to visit target URLs and extract browser telemetry by evaluating the embedded collect.js script.
func NewCollector ¶
NewCollector creates a Collector backed by the given pool.
func (*Collector) CollectTelemetry ¶
type NoOpCollector ¶
type NoOpCollector struct{}
NoOpCollector is a puppet implementation that does nothing. Used when puppet is disabled or Chromium is unavailable.
func (*NoOpCollector) CollectTelemetry ¶
type OverrideBuilder ¶
type OverrideBuilder struct{}
OverrideBuilder converts raw telemetry into a JS IIFE that overrides browser properties to match a real Chromium visit.
func (*OverrideBuilder) BuildOverride ¶
func (b *OverrideBuilder) BuildOverride(telemetry map[string]any) string
BuildOverride generates a self-executing JS snippet that overrides navigator and screen properties with the values collected from the real target site.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages a fixed set of reusable Chromium browser contexts backed by a shared ExecAllocator. Acquire returns a context for a new tab; Release returns it for reuse.
func NewPool ¶
NewPool creates a Chromium instance pool. It pre-spawns cfg.MinInstances browser contexts and allows up to cfg.MaxInstances.
func (*Pool) Acquire ¶
Acquire returns a browser context from the pool, spawning a new one if the pool is empty and capacity allows.