sseproxy is a SSE (Server-Sent Events) supported HTTP revese proxy.
sseproxy.Proxy
keeps HTTP connections too long time, so it should be better
to accept minimum connections.
It can be used just like httputil.NewSingleHostReverseProxy
.
import (
"net/http"
"net/url"
"github.com/tama-go/sseproxy"
)
u, _ := url.Parse("http://example.com")
p := sseproxy.New(u)
http.ListenAndServe(":8080", p)