Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
195d772beb
commit
065b0c5847
@ -32,7 +32,7 @@ sqlx = { version = "0.7.3", features = [
|
|||||||
] }
|
] }
|
||||||
chrono = "0.4.34"
|
chrono = "0.4.34"
|
||||||
git2 = "0.18.3"
|
git2 = "0.18.3"
|
||||||
rustls = { version = "0.23.12", features = ["ring"] }
|
rustls = { version = "0.23.12" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tonic-build = "0.12.0"
|
tonic-build = "0.12.0"
|
||||||
|
@ -10,6 +10,14 @@ pub type FluxReleaserGrpcClient = Arc<Mutex<FluxReleaserClient<Channel>>>;
|
|||||||
pub async fn new_client(registry: impl Into<String>) -> anyhow::Result<FluxReleaserGrpcClient> {
|
pub async fn new_client(registry: impl Into<String>) -> anyhow::Result<FluxReleaserGrpcClient> {
|
||||||
let registry: String = registry.into();
|
let registry: String = registry.into();
|
||||||
|
|
||||||
|
static INIT: std::sync::Once = std::sync::Once::new();
|
||||||
|
|
||||||
|
INIT.call_once(|| {
|
||||||
|
rustls::crypto::aws_lc_rs::default_provider()
|
||||||
|
.install_default()
|
||||||
|
.unwrap();
|
||||||
|
});
|
||||||
|
|
||||||
let channel = if registry.starts_with("https") {
|
let channel = if registry.starts_with("https") {
|
||||||
let tls = ClientTlsConfig::new();
|
let tls = ClientTlsConfig::new();
|
||||||
|
|
||||||
|
@ -9,10 +9,6 @@ pub mod services;
|
|||||||
pub async fn run() -> anyhow::Result<()> {
|
pub async fn run() -> anyhow::Result<()> {
|
||||||
dotenv::dotenv().ok();
|
dotenv::dotenv().ok();
|
||||||
|
|
||||||
rustls::crypto::ring::default_provider()
|
|
||||||
.install_default()
|
|
||||||
.expect("Failed to install rustls crypto provider");
|
|
||||||
|
|
||||||
Command::run().await?;
|
Command::run().await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user