2018-04-19 11:36:56 +00:00
|
|
|
package crawler
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.loafle.net/overflow/crawler-go"
|
|
|
|
|
|
|
|
"git.loafle.net/overflow/container_discovery/crawler/discovery"
|
|
|
|
)
|
|
|
|
|
|
|
|
var crawlers map[string]crawler.Crawler
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
crawlers = make(map[string]crawler.Crawler, 0)
|
2018-04-19 15:32:27 +00:00
|
|
|
addCrawler(discovery.NewCrawler())
|
2018-04-19 11:36:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func addCrawler(c crawler.Crawler) {
|
|
|
|
crawlers[c.Name()] = c
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetCrawlers() map[string]crawler.Crawler {
|
|
|
|
return crawlers
|
|
|
|
}
|