browserwatcher

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package browserwatcher provides a utility to monitor browser process for crashes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

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

Watcher watches the browser process to attempt to identify situations where Chrome is crashing.

func NewWatcher

func NewWatcher(ctx context.Context, execPath string) (*Watcher, error)

NewWatcher creates a new Watcher and starts it. Returns only when the chrome PID it's watching has been identified.

func (*Watcher) Close

func (bw *Watcher) Close() error

Close synchronously stops the watch goroutine.

func (*Watcher) Err

func (bw *Watcher) Err() error

Err returns the first error that was observed or nil if no error was observed.

func (*Watcher) ReplaceErr

func (bw *Watcher) ReplaceErr(err error) error

ReplaceErr returns the first error that was observed if any. Otherwise, it returns err as-is.

func (*Watcher) WaitExit

func (bw *Watcher) WaitExit(ctx context.Context) error

WaitExit polls until the *Watcher's target process is no longer running.

Jump to

Keyboard shortcuts

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