Documentation
¶
Overview ¶
Package browser manages alternative browser backends for CDP-based automation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lightpanda ¶
type Lightpanda struct {
// contains filtered or unexported fields
}
Lightpanda manages the Lightpanda browser process.
func NewLightpanda ¶
func NewLightpanda(binDir, port string) *Lightpanda
NewLightpanda creates a new Lightpanda manager. binDir is where the binary is stored; if empty, defaults to ~/.cache/tap/lightpanda/. port is the CDP port; if empty, defaults to 9222.
func (*Lightpanda) Cleanup ¶
func (lp *Lightpanda) Cleanup() error
Cleanup removes the downloaded binary.
func (*Lightpanda) EnsureInstalled ¶
func (lp *Lightpanda) EnsureInstalled(ctx context.Context) error
EnsureInstalled downloads the Lightpanda binary if it doesn't exist or is empty.
func (*Lightpanda) Running ¶
func (lp *Lightpanda) Running() bool
Running reports whether the Lightpanda server is currently running.
func (*Lightpanda) Start ¶
func (lp *Lightpanda) Start(ctx context.Context) error
Start launches the Lightpanda server and waits for it to be ready. It is safe to call multiple times — subsequent calls are no-ops if already running.
func (*Lightpanda) WSURL ¶
func (lp *Lightpanda) WSURL() string
WSURL returns the WebSocket URL for the running Lightpanda instance.