browser

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 12 Imported by: 0

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) Stop

func (lp *Lightpanda) Stop()

Stop terminates the Lightpanda process.

func (*Lightpanda) WSURL

func (lp *Lightpanda) WSURL() string

WSURL returns the WebSocket URL for the running Lightpanda instance.

Jump to

Keyboard shortcuts

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