Registry / networking / tv42-httpunix

tv42-httpunix

JSON →
library0.0.0-20191220191345-2ba4b9c3382cgogounverified

An HTTP transport that uses Unix domain sockets instead of TCP for net/http.

go get github.com/tv42/httpunix
INSTALL
IMPORT
SIG · TV42-HTTPUNIX
T
tv42-httpunix
networkinggov0.0.0-20191220191345-2ba4b9c3382c
harness data pending
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.

Agent activity
24 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
tv42-httpunix — go get tv42-httpunix · libregistry