MCPcopy Index your code
hub / github.com/coder/coder / pingPostgres

Function pingPostgres

cli/server.go:2696–2701  ·  view source on GitHub ↗
(ctx context.Context, db *sql.DB)

Source from the content-addressed store, hash-verified

2694}
2695
2696func pingPostgres(ctx context.Context, db *sql.DB) error {
2697 // nolint:gocritic // This is a reasonable magic number for a ping timeout.
2698 ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
2699 defer cancel()
2700 return db.PingContext(ctx)
2701}
2702
2703type HTTPServers struct {
2704 HTTPUrl *url.URL

Callers 1

ConnectToPostgresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected