Ping checks whether a connection to the database is still alive by pinging it, establishing a connection if necessary.
()
| 149 | // Ping checks whether a connection to the database is still alive by pinging |
| 150 | // it, establishing a connection if necessary. |
| 151 | func (s *Source) Ping() error { |
| 152 | return s.session.Ping(context.Background(), nil) |
| 153 | } |
| 154 | |
| 155 | func (s *Source) Reset() { |
| 156 | s.collectionsMu.Lock() |