config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabiConfig

type RabiConfig struct {
	// Delay the next request between from and to milliseconds
	// if only from is specified, delay exactly from milliseconds
	// TODO
	Delay []time.Duration `default:"1s"`
	// Concurrency limits concurrency
	// TODO
	Concurrency int
	// ThrottleNum limits the request rate to ThrottleNum per ThrottleDuration
	// TODO
	ThrottleNum      int           `split_words:"true"`
	ThrottleDuration time.Duration `split_words:"true"`
	// Timeout specify a timeout for each page loading and element lookup
	Timeout time.Duration `default:"10s"`
	// Mode Headless or browser
	Mode string `default:"headless"`
	// Debug if true, it will take full screenshot of every page and output debug logs to stdout
	Debug bool
	// Out screenshot png files output path
	Out string
}

func LoadFromEnv

func LoadFromEnv() *RabiConfig

Jump to

Keyboard shortcuts

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