browser

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBinNotFound  = errors.New("no compatible browser was found")
	ErrProcNotFound = errors.New("process not found")
)

Functions

func Close

func Close(ctx context.Context, opts Options, pid uint64) error

func Open

func Open(ctx context.Context, opts Options) (uint64, error)

func Wait

func Wait(ctx context.Context, opts Options) error

Types

type Browser

type Browser interface {
	Open(ctx context.Context) (uint64, error)

	Close(ctx context.Context, pid uint64) error
}

func New

func New(opts Options) Browser

type LinuxBrowser

type LinuxBrowser struct {
	// contains filtered or unexported fields
}

func (*LinuxBrowser) Close

func (b *LinuxBrowser) Close(ctx context.Context, pid uint64) error

func (*LinuxBrowser) Open

func (b *LinuxBrowser) Open(ctx context.Context) (uint64, error)

type Options

type Options struct {
	Detach   bool
	Headless bool
	Address  string
	Port     uint64
	UserDir  string
}

func NewDefaultOptions

func NewDefaultOptions() Options

func (Options) ToFlags

func (opts Options) ToFlags() []string

func (Options) ToURL

func (opts Options) ToURL() string

Jump to

Keyboard shortcuts

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