GetMetricsDB gets a connection to the named database authenticated as cnpg_metrics_exporter.
(dbname string)
| 878 | |
| 879 | // GetMetricsDB gets a connection to the named database authenticated as cnpg_metrics_exporter. |
| 880 | func (instance *Instance) GetMetricsDB(dbname string) (*sql.DB, error) { |
| 881 | return instance.metricsConnectionPool().Connection(dbname) |
| 882 | } |
| 883 | |
| 884 | // PostgreSQL SQLSTATE for "invalid authorization specification" (Class 28). |
| 885 | // See https://www.postgresql.org/docs/current/errcodes-appendix.html |
no test coverage detected