MCPcopy Index your code
hub / github.com/rclone/rclone / NewClientWithUnixSocket

Function NewClientWithUnixSocket

fs/fshttp/http.go:326–332  ·  view source on GitHub ↗

NewClientWithUnixSocket returns an http.Client with the correct timeout. It internally uses NewClientCustom with a custom dialer connecting to the specified unix domain socket.

(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

324// It internally uses NewClientCustom with a custom dialer connecting to
325// the specified unix domain socket.
326func NewClientWithUnixSocket(ctx context.Context, path string) *http.Client {
327 return NewClientCustom(ctx, func(t *http.Transport) {
328 t.DialContext = func(reqCtx context.Context, network, addr string) (net.Conn, error) {
329 return NewDialer(ctx).DialContext(reqCtx, "unix", path)
330 }
331 })
332}
333
334// Transport is our http Transport which wraps an http.Transport
335// * Sets the User Agent

Callers 2

NewFsFunction · 0.92
doCallFunction · 0.92

Calls 3

NewClientCustomFunction · 0.85
NewDialerFunction · 0.85
DialContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…