defaults

package
v0.116.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package defaults of commonly used options parsed from environment. Check ResetWith for details.

Index

Constants

This section is empty.

Variables

Bin is the default of launcher.Launcher.Bin . Option name is "bin".

CDP is the default of cdp.Client.Logger Option name is "cdp".

View Source
var Devtools bool

Devtools is the default of launcher.Launcher.Devtools . Option name is "devtools".

Dir is the default of launcher.Launcher.UserDataDir . Option name is "dir".

View Source
var LockPort int

LockPort is the default of launcher.Browser.LockPort Option name is "lock".

View Source
var Monitor string

Monitor is the default of rod.Browser.ServeMonitor . Option name is "monitor".

View Source
var Port string

Port is the default of launcher.Launcher.RemoteDebuggingPort . Option name is "port".

View Source
var Proxy string

Proxy is the default of launcher.Launcher.Proxy Option name is "proxy".

View Source
var Show bool

Show is the default of launcher.Launcher.Headless . Option name is "show".

Slow is the default of rod.Browser.SlowMotion . The format is same as https://golang.org/pkg/time/#ParseDuration Option name is "slow".

View Source
var Trace bool

Trace is the default of rod.Browser.Trace . Option name is "trace".

URL is the default websocket url for remote control a browser. Option name is "url".

Functions

func Reset

func Reset()

Reset all flags to their init values.

func ResetWith

func ResetWith(options string)

ResetWith options and "-rod" command line flag. It will be called in an init() , so you don't have to call it manually. It will try to load the cli flag "-rod" and then the options, the later override the former. If you want to disable the global cli argument flag, set env DISABLE_ROD_FLAG. Values are separated by commas, key and value are separated by "=". For example:

go run main.go -rod=show
go run main.go -rod show,trace,slow=1s,monitor
go run main.go --rod="slow=1s,dir=path/has /space,monitor=:9223"

Types

This section is empty.

Jump to

Keyboard shortcuts

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