config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 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 Config

type Config struct {
	MaxDepth        int      `json:"max_depth"`
	MinSleep        int      `json:"min_sleep"`
	MaxSleep        int      `json:"max_sleep"`
	Timeout         int      `json:"timeout"`
	RootURLs        []string `json:"root_urls"`
	BlacklistedURLs []string `json:"blacklisted_urls"`
	UserAgents      []string `json:"user_agents"`
}

Config represents the configuration for the crawler

func LoadDefaultConfig

func LoadDefaultConfig() (*Config, error)

LoadDefaultConfig loads the default configuration embedded in the binary

func LoadFromFile

func LoadFromFile(filePath string) (*Config, error)

LoadFromFile loads configuration from a JSON file

Jump to

Keyboard shortcuts

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