2018-10-08 22:19:17 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"math/rand"
|
2020-05-19 23:13:01 +02:00
|
|
|
"net/http"
|
2018-10-08 22:19:17 +02:00
|
|
|
"time"
|
|
|
|
|
2021-09-27 16:11:07 +02:00
|
|
|
"github.com/lbryio/ytsync/v5/cmd"
|
2019-08-13 05:20:09 +02:00
|
|
|
|
2021-09-27 16:11:07 +02:00
|
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
2019-07-15 22:16:02 +02:00
|
|
|
log "github.com/sirupsen/logrus"
|
2018-10-08 22:19:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
rand.Seed(time.Now().UnixNano())
|
|
|
|
log.SetLevel(log.DebugLevel)
|
2021-09-27 16:11:07 +02:00
|
|
|
|
2020-05-19 23:13:01 +02:00
|
|
|
go func() {
|
2021-09-27 16:11:07 +02:00
|
|
|
http.Handle("/metrics", promhttp.Handler())
|
2020-05-19 23:13:01 +02:00
|
|
|
log.Error(http.ListenAndServe(":2112", nil))
|
|
|
|
}()
|
2018-10-08 22:19:17 +02:00
|
|
|
|
2021-09-27 16:11:07 +02:00
|
|
|
cmd.Execute()
|
2018-10-08 22:19:17 +02:00
|
|
|
}
|