configs

package
v0.0.0-...-e37eb7d Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package configs 配置层

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSeedFile

func LoadSeedFile(path string) ([]string, error)

LoadSeedFile 根据文件路径读取种子URL

Types

type Config

type Config struct {
	Spider SpiderConfig
}

Config 配置汇总

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig 加载配置

type SpiderConfig

type SpiderConfig struct {
	URLListFile      string `gcfg:"urlListFile"`
	OutputDirectory  string `gcfg:"outputDirectory"`
	MaxDepth         int    `gcfg:"maxDepth"`
	CrawlInterval    int    `gcfg:"crawlInterval"`
	CrawlTimeout     int    `gcfg:"crawlTimeout"`
	TargetURLPattern string `gcfg:"targetUrl"`
	ThreadCount      int    `gcfg:"threadCount"`
}

SpiderConfig spider配置

Jump to

Keyboard shortcuts

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