- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for IsConnRefusedErr (0.16 sec)
-
internal/event/target/redis.go
defer conn.Close() _, pingErr := conn.Do("PING") if pingErr != nil { if xnet.IsConnRefusedErr(pingErr) { return store.ErrNotConnected } return pingErr } if !target.firstPing { if err := target.args.validateFormat(conn); err != nil { if xnet.IsConnRefusedErr(err) { return store.ErrNotConnected } return err } target.firstPing = true }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 9.1K bytes - Viewed (0) -
internal/event/target/nsq.go
if err != nil { return false, err } target.producer = producer } if err := target.producer.Ping(); err != nil { // To treat "connection refused" errors as errNotConnected. if xnet.IsConnRefusedErr(err) { return false, store.ErrNotConnected } return false, err } return true, nil } // Save - saves the events to the store which will be replayed when the nsq connection is active.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 7.1K bytes - Viewed (0) -
internal/event/target/postgresql.go
_, 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" } // send - sends an event to the PostgreSQL.
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/amqp.go
return nil, nil, err } // close when we know this is a network error. target.conn.Close() } conn, err = amqp091.Dial(target.args.URL.String()) if err != nil { if xnet.IsConnRefusedErr(err) { return nil, nil, store.ErrNotConnected } return nil, nil, err } ch, err = conn.Channel() if err != nil { return nil, nil, err } target.conn = conn
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 10K bytes - Viewed (0) -
internal/event/target/mysql.go
if args.MaxOpenConnections > 0 { // Set the maximum connections limit target.db.SetMaxOpenConns(args.MaxOpenConnections) } err = target.db.Ping() if err != nil { if !(xnet.IsConnRefusedErr(err) || xnet.IsConnResetErr(err)) { target.loggerOnce(context.Background(), err, target.ID().String()) } } else { if err = target.executeStmts(); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 11.6K bytes - Viewed (0)