package main

import (
	"go.uber.org/zap"
	"reader/internal/config"
	logger "reader/internal/log"
	"reader/internal/metrics"
	"reader/internal/unpacker"
)

func main() {
	//port := 8080
	//
	//http.HandleFunc("GET /download", handlers.Download) // example request: {"date": "07-03-2025", "start_time": "16-43", "end_time": "16-44"}
	//http.HandleFunc("GET /hls/", handlers.HLS)
	//
	//log.Println("Starting server on:")
	//log.Printf("Serving on HTTP port: %d\n", port)
	//
	//log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))

	go metrics.Metrics()
	logger.StartMainLogger(config.Local, "reader")

	err := unpacker.CreateVideo(config.Local)
	if err != nil {
		logger.Log.Error("Failed to create flow", zap.Error(err))
	}
}

//remote_write:
//- url: https://prometheus-prod-53-prod-me-central-1.grafana.net/api/prom/push
//basic_auth:
//username: 2350647
//password: glc_eyJvIjoiMTM4ODkxOCIsIm4iOiJzdGFjay0xMjEzMjA0LWhtLXdyaXRlLXBzYSIsImsiOiJibnU4bFI4ZHM2NXQ4MUo3a2UwSzRnWjMiLCJtIjp7InIiOiJwcm9kLW1lLWNlbnRyYWwtMSJ9fQ==
