MCPcopy Create free account
hub / github.com/upper/db / Ping

Method Ping

adapter/mongo/database.go:151–153  ·  view source on GitHub ↗

Ping checks whether a connection to the database is still alive by pinging it, establishing a connection if necessary.

()

Source from the content-addressed store, hash-verified

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

Callers 1

openMethod · 0.95

Calls 1

PingMethod · 0.65

Tested by

no test coverage detected