- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for IsConnErr (0.06 sec)
-
internal/event/target/postgresql.go
if err := target.init(); err != nil { return err } _, err := target.isActive() if err != nil { return err } return target.send(eventData) } // IsConnErr - To detect a connection error. func IsConnErr(err error) bool { return xnet.IsConnRefusedErr(err) || err.Error() == "sql: database is closed" || err.Error() == "sql: statement is closed" || err.Error() == "invalid connection" }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/event/target/mysql.go
if err := target.init(); err != nil { return false, err } return target.isActive() } func (target *MySQLTarget) isActive() (bool, error) { if err := target.db.Ping(); err != nil { if IsConnErr(err) { return false, store.ErrNotConnected } return false, err } return true, nil } // Save - saves the events to the store which will be replayed when the SQL connection is active.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 11.6K bytes - Viewed (0)