Skip to content

Commit 72a03bf

Browse files
committed
docs: add database docs
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 733f735 commit 72a03bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/tap-agent/src/database.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ use std::time::Duration;
55

66
use sqlx::{postgres::PgPoolOptions, PgPool};
77

8+
/// Uses `config` to connect to a postgres and returns a [PgPool] instance.
9+
///
10+
/// This function panics if it wasn't possible to connect to the Db.
811
pub async fn connect(config: indexer_config::DatabaseConfig) -> PgPool {
912
let url = &config.get_formated_postgres_url();
1013
tracing::debug!(

0 commit comments

Comments
 (0)