go-redis
go-redis copied to clipboard
feat(plugin): add conn plugin api
This PR added the plugin functionality for network connection. Currently, it supports three plugin hook points: PreInitConnPlugin, InitConnPlugin, and PostInitConnPlugin.
Its functions are as follows:
- It is necessary to customize the connection authentication. There are some third-party proxies and Redis-compatible storage repositories that do not have complete support for certain Redis functionalities and commands. For example, many proxies do not support the HELLO command (which is used for authentication in version 9 by default).
- It can execute commands related to network connections, such as #2553 and #2492. These commands are specifically associated with network connections.
- There are some requirements in special environments where customization of initialization operations is desired, such as #2537.
Currently, only the basic functionalities have been implemented, and there is no support for client features like cluster/sentinel/ring. Testing and documentation have not been added either. After receiving feedback from everyone, further improvements will be made.
Additionally, this may be influenced by #2586.