You signed in with another tab or window.Reloadto refresh your session.You signed out in another tab or window.Reloadto refresh your session.You switched accounts on another tab or window.Reloadto refresh your session.Dismiss alert
The document you expected this should be explained
Expected answer
I use "db.Callback().Query().After(" gorm:after_query ").Register(" after_query ", errCircult)" to register errCircult to detect db circult status. how can I get addr(ip adn port) from a gorm.DB value.
func errCircult(db *gorm.DB) {
if db.Error!= nil && db.Error!= gorm.ErrRecordNotFound {
ins, _:= MysqlPolarisApi.GetInstance(map[string]string{ "ro": "sz" })
// how to get ip and report it to Circuit Breaker
MysqlPolarisApi.CallResult(ins, model.RetFail, 1002, time.Duration(100))
}
}
The text was updated successfully, but these errors were encountered:
Your Question
The document you expected this should be explained
Expected answer
I use "db.Callback().Query().After(" gorm:after_query ").Register(" after_query ", errCircult)" to register errCircult to detect db circult status. how can I get addr(ip adn port) from a gorm.DB value.
func errCircult(db *gorm.DB) {
if db.Error!= nil && db.Error!= gorm.ErrRecordNotFound {
ins, _:= MysqlPolarisApi.GetInstance(map[string]string{ "ro": "sz" })
// how to get ip and report it to Circuit Breaker
MysqlPolarisApi.CallResult(ins, model.RetFail, 1002, time.Duration(100))
}
}
The text was updated successfully, but these errors were encountered: