Simplify cli option, add channel search

This commit is contained in:
Dominik Werder
2021-05-27 16:23:38 +02:00
parent e55751ad67
commit 53957a261a
9 changed files with 155 additions and 22 deletions

View File

@@ -3,6 +3,8 @@ use netpod::log::*;
use netpod::{Channel, NodeConfigCached};
use tokio_postgres::{Client, NoTls};
pub mod search;
pub async fn create_connection(node_config: &NodeConfigCached) -> Result<Client, Error> {
let d = &node_config.node_config.cluster.database;
let uri = format!("postgresql://{}:{}@{}:{}/{}", d.user, d.pass, d.host, 5432, d.name);