zenyanle opened a new pull request, #7112: URL: https://github.com/apache/opendal/pull/7112
# Which issue does this PR close? # Rationale for this change Currently, the `memcached` service only supports TCP connections. However, in many local or containerized environments, connecting via Unix Domain Sockets (UDS) is preferred for better performance or security. This PR introduces support for UDS and refactors the connection logic to handle different transport protocols uniformly. # What changes are included in this PR? - **Dependency Update**: Switched from `http` to `url` crate for more flexible endpoint parsing (specifically for non-HTTP schemes like `unix`). - **New Abstraction**: Introduced `SocketStream` enum to unify `TcpStream` and `UnixStream` implementations under `AsyncRead` and `AsyncWrite`. - **Builder Update**: Updated the builder to parse `unix://` schemes and support local socket paths. - **Backward Compatibility**: Maintained support for scheme-less endpoints (defaulting to TCP) to ensure existing configurations continue to work. # Are there any user-facing changes? Yes. Users can now configure the `endpoint` with the `unix` scheme to connect via a Unix Domain Socket. Example: - `unix:///tmp/memcached.sock` Existing TCP configurations (e.g., `127.0.0.1:11211`) remain unaffected. # AI Usage Statement This PR was developed with assistance from GitHub Copilot (Claude Opus 4.5). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
