It not a perfect implementation. I made it because I was bored of making APIs and wanted to learn something new.
- Create following kafka topics: -
crawl_urls
,crawled_pages
- Inside
crawl_manager
andcrawler
folder runmake run
- Hit this cURL
curl --location 'localhost:8080/crawl' \
--header 'Content-Type: application/json' \
--data '{
"urls" : ["URL HERE", "URL HERE"]
}'
- Change them in
crawl_manager/cmd/main.go
andcrawler/cmd/main.go
- Or please user Viper and open a raise a Pull Request 🙃.
Always welcome.