Documentation
¶
Overview ¶
Package defaults of commonly used options parsed from environment. Check ResetWithEnv for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Bin string
Bin is the default of launcher.Launcher.Bin . Env name is "bin".
var CDP utils.Logger
CDP is the default of cdp.Client.Logger Env name is "cdp".
var Devtools bool
Devtools is the default of launcher.Launcher.Devtools . Env name is "devtools".
var Dir string
Dir is the default of launcher.Launcher.UserDataDir . Env name is "dir".
var LockPort int
LockPort is the default of launcher.Browser.LockPort Env name is "lock".
var Monitor string
Monitor is the default of rod.Browser.ServeMonitor . Env name is "monitor".
var Port string
Port is the default of launcher.Launcher.RemoteDebuggingPort . Env name is "port".
var Proxy string
Proxy is the default of launcher.Launcher.Proxy Env name is "trace".
var Show bool
Show is the default of launcher.Launcher.Headless . Env name is "show".
var Slow time.Duration
Slow is the default of rod.Browser.Slowmotion . The format is same as https://golang.org/pkg/time/#ParseDuration Env name is "slow".
var Trace bool
Trace is the default of rod.Browser.Trace . Env name is "trace".
var URL string
URL is the default of cdp.Client.New . Env name is "url".
Functions ¶
func ResetWithEnv ¶ added in v0.54.0
func ResetWithEnv(env string)
ResetWithEnv set the default value of options used by rod. It will be called in an init() , so you don't have to call it manually. The followings will be parsed and merged, later overrides previous:
os.Open(".rod") os.Getenv("rod") env
Values are separated by commas, key and value are separated by "=", For example, on unix-like OS:
rod="show,trace,slow=1s,monitor" go run main.go rod="slow=1s,dir=path/has /space,monitor=:9223" go run main.go
An example of ".rod" file content:
slow=1s dir=path/has /space monitor=:9223
Types ¶
This section is empty.