package server import ( "fmt" "net/http" "net/http/httputil" "os" // "strconv" "sync" "time" _ "github.com/joho/godotenv/autoload" ) // // type Server struct { // port int // } // type Backend struct { URL *url.URL Alive bool mux sync.RWMutex ReverseProxy *httputil.ReverseProxy } type SeverPool struct { backends []*Backend current uint64 } u, _ := url.Parse("http://localhost:8080") rp := httputil.NewSingleHostReverseProxy(u) http.HandlerFunc(rp.ServeHTTP)