Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
httpunix
✓ github.com/tv42/httpunix
Create an HTTP client that communicates via Unix socket
package main
import (
"net/http"
"github.com/tv42/httpunix"
)
func main() {
t := &httpunix.Transport{
DialTimeout: 100,
RequestTimeout: 100,
ResponseHeaderTimeout: 100,
}
t.RegisterLocation("myservice", "/var/run/myservice.sock")
client := &http.Client{Transport: t}
resp, err := client.Get("http+unix://myservice/path")
if err != nil {
panic(err)
}
defer resp.Body.Close()
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20191220191345-2ba4b9c3382clatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.