-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于读写分离的小问题 #8
Comments
@Snowin1994 gosql.Use(“dbname”) |
目前还不支持自动读写分离,需要自行决定连接读库还是写库,比如config["master"] config["slave"] ,使用的时候
|
通过 |
如果要使用Model,这里的确是不行的,因为Model是通过结构体的Db函数得到数据库连接实例,在我们的实际项目中读写分离是mysql proxy处理的,应用层本身是不关心的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gosql怎么支持读写分离呢,我注意到db链接是可以配置多个的,如何切换呢?
The text was updated successfully, but these errors were encountered: