athena_rs 3.23.0

Hyper performant polyglot Database driver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Logging-client pool resolution helpers.
//!
//! This module owns resolution of the configured logging client and active
//! Postgres pool for `/debug/schema` service loading.

use actix_web::HttpResponse;
use sqlx::{Pool, Postgres};

use crate::AppState;
use crate::api::client_context::logging_client_name_and_pool;

/// Resolves the configured logging client and its active Postgres pool.
pub(in super::super) fn logging_client_and_pool(
    app_state: &AppState,
) -> Result<(String, Pool<Postgres>), HttpResponse> {
    logging_client_name_and_pool(app_state)
}