diff --git a/src/host/service/stats.go b/src/host/service/stats.go index 85c53dd..962e9e2 100644 --- a/src/host/service/stats.go +++ b/src/host/service/stats.go @@ -79,7 +79,7 @@ type Stats struct { gTime time.Time } -func newStats() *Stats { +func NewStats() *Stats { return &Stats{ gTime: time.Now(), torrents: make(map[string]*torrent.Torrent), diff --git a/src/http/api.go b/src/http/api.go index 9a232e8..96fba6a 100644 --- a/src/http/api.go +++ b/src/http/api.go @@ -29,7 +29,7 @@ var apiStatusHandler = func(fc *filecache.Cache, ss *service.Stats) gin.HandlerF } } -// var apiServersHandler = func(ss []*torrent.Server) gin.HandlerFunc { +// var apiServersHandler = func(ss []*service.Server) gin.HandlerFunc { // return func(ctx *gin.Context) { // var infos []*torrent.ServerInfo // for _, s := range ss { @@ -39,7 +39,7 @@ var apiStatusHandler = func(fc *filecache.Cache, ss *service.Stats) gin.HandlerF // } // } -// var apiRoutesHandler = func(ss *torrent.Stats) gin.HandlerFunc { +// var apiRoutesHandler = func(ss *service.Stats) gin.HandlerFunc { // return func(ctx *gin.Context) { // s := ss.RoutesStats() // sort.Sort(torrent.ByName(s)) @@ -47,7 +47,7 @@ var apiStatusHandler = func(fc *filecache.Cache, ss *service.Stats) gin.HandlerF // } // } -// var apiAddTorrentHandler = func(s *torrent.Service) gin.HandlerFunc { +// var apiAddTorrentHandler = func(s *service.Service) gin.HandlerFunc { // return func(ctx *gin.Context) { // route := ctx.Param("route") @@ -66,7 +66,7 @@ var apiStatusHandler = func(fc *filecache.Cache, ss *service.Stats) gin.HandlerF // } // } -// var apiDelTorrentHandler = func(s *torrent.Service) gin.HandlerFunc { +// var apiDelTorrentHandler = func(s *service.Service) gin.HandlerFunc { // return func(ctx *gin.Context) { // route := ctx.Param("route") // hash := ctx.Param("torrent_hash")