Documentation ¶
Index ¶
- func ConfigFetcher(proxyFunc proxy.Func, timeout int, logger *zap.Logger) spider.Fetcher
- func ConfigLogger(cfg config.Config) (*zap.Logger, error)
- func ConfigProxyFunc(cfg config.Config, logger *zap.Logger) (proxy.Func, int, error)
- func ConfigStorager(cfg config.Config, logger *zap.Logger) (spider.Storage, error)
- func ConfigTasks(cfg config.Config, f spider.Fetcher, storager spider.Storage, ...) ([]*spider.Task, error)
- func ConfigWorkerEngine(sconfig *ServerConfig, seeds []*spider.Task, f spider.Fetcher, ...) (*engine.Crawler, error)
- func LoadConfig(cfgFile string) (config.Config, error)
- func ParseTaskConfig(logger *zap.Logger, f spider.Fetcher, s spider.Storage, ...) []*spider.Task
- func RunGRPCServer(hdlr *master.Master, logger *zap.Logger, cfg ServerConfig, ...)
- func RunGRPCServerForMaster(hdlr *master.Master, logger *zap.Logger, cfg ServerConfig, ...)
- func RunHTTPServer(logger *zap.Logger, cfg ServerConfig)
- type Greeter
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFetcher ¶
func ConfigProxyFunc ¶
func ConfigStorager ¶
func ConfigTasks ¶
func ConfigWorkerEngine ¶
func ParseTaskConfig ¶
func RunGRPCServer ¶
func RunGRPCServerForMaster ¶
func RunHTTPServer ¶
func RunHTTPServer(logger *zap.Logger, cfg ServerConfig)
Types ¶
type ServerConfig ¶
type ServerConfig struct { GRPCListenAddr string HTTPListenAddr string ID string RegistryAddr string RegisterTTL int RegisterInterval int Name string ClientTimeOut int }
func ConfigMasterServer ¶
func ConfigWorkerServer ¶
Click to show internal directories.
Click to hide internal directories.