You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That doesn't really work with HTTP.jl right now, the connection layer doesn't support these sockets, and there isn't a way to separate the path to the socket from the path to request. One interesting approach by https://github.com/msabramo/requests-unixsocket is using the following URI format: http+unix://%2Fvar%2Frun%2Fdocker.sock/info.
The text was updated successfully, but these errors were encountered:
Yeah, I don't think this would be too hard; we already have some mechanisms that theoretically help support this by allowing the user to pass a socket_type keyword arg and then we just have to ensure a ConnectionPool.getconnection method is defined for it. You can see how we overload those in the tests for a "loopback interface" (test/loopback.jl).
Going to mark this as an "enhancement" + "help wanted" and the 1.X milestone as this wouldn't require breaking changes (it touches only pretty internal code).
Note I recently learned of PipeEndpoint and PipeServer which exist precisely to provide the LibuvStream interface like TcpSocket. And the server code should already "just work" by passing a PipeServer as the server socket argument.
So we'd really just need to have a getconnection method in ConnectionPool that has an overload for PipeEndpoint and handled opening the connection (or perhaps we can just reuse the TcpSocket code already since they should have the same interface?).
So the last piece is really just figuring out how users specify that a PipeEndpoint should be used instead of a TcpSocket for doing the client request; either a custom schema as @maleadt mentioned above, or just some keyword argument?
I was trying to communicate with a local domain socket that accepts HTTP, which I'm currently doing like so:
That doesn't really work with HTTP.jl right now, the connection layer doesn't support these sockets, and there isn't a way to separate the path to the socket from the path to request. One interesting approach by https://github.com/msabramo/requests-unixsocket is using the following URI format:
http+unix://%2Fvar%2Frun%2Fdocker.sock/info
.The text was updated successfully, but these errors were encountered: