chrome

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const ChromiumRevision = "518818"

ChromiumRevision chromium revision

View Source
const DownloadHost = "https://storage.googleapis.com"

DownloadHost download host

Variables

This section is empty.

Functions

func Download

func Download(dir string) error

Download path

func Exists

func Exists(dir string) (string, error)

Exists checks if chrome exists on our system or not

Types

type Chrome

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

Chrome struct

func New

func New(parent context.Context, settings *Settings) (*Chrome, error)

New chrome

func Start added in v0.1.6

func Start(ctx context.Context, chromePath string) (*Chrome, error)

Start chrome, downloading if necessary

func (*Chrome) Close

func (c *Chrome) Close() error

Close with an error

func (*Chrome) Target

func (c *Chrome) Target() (*Target, error)

Target creates a new target

type Settings

type Settings struct {
	ExecutablePath string
	Flags          []string
	Stdout         io.Writer
	Stderr         io.Writer
	Addr           string
}

Settings struct

type Target

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

Target struct

func (*Target) Close

func (t *Target) Close() (err error)

Close the target

func (*Target) Run

func (t *Target) Run(source string) (result string, err error)

Run the script

Jump to

Keyboard shortcuts

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