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)) } }
Comment From: github-actions[bot]
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days