Add traffic monitor

This commit is contained in:
Ben Adrian Sarmiento
2024-06-24 13:05:11 +02:00
parent 921908c890
commit 4049fa7d83
5 changed files with 113 additions and 14 deletions

View File

@@ -25,6 +25,7 @@ type Handlers struct {
cfg config.ConfigInterface
api *realdebrid.RealDebrid
workerPool *ants.Pool
hosts []string
log *logutil.Logger
}
@@ -34,13 +35,14 @@ func init() {
chi.RegisterMethod("MOVE")
}
func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *torrent.TorrentManager, cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool *ants.Pool, log *logutil.Logger) {
func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *torrent.TorrentManager, cfg config.ConfigInterface, api *realdebrid.RealDebrid, workerPool *ants.Pool, hosts []string, log *logutil.Logger) {
hs := &Handlers{
downloader: downloader,
torMgr: torMgr,
cfg: cfg,
api: api,
workerPool: workerPool,
hosts: hosts,
log: log,
}