24 lines
407 B
Go
24 lines
407 B
Go
|
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)
|
||
|
}
|
||
|
|
||
|
func addCrawler(c crawler.Crawler) {
|
||
|
crawlers[c.Name()] = c
|
||
|
|
||
|
addCrawler(discovery.NewCrawler())
|
||
|
}
|
||
|
|
||
|
func GetCrawlers() map[string]crawler.Crawler {
|
||
|
return crawlers
|
||
|
}
|