runtime: wire builder into community binaries
This commit is contained in:
@@ -23,7 +23,7 @@ use crate::{
|
||||
};
|
||||
use crank_runtime::{
|
||||
RequestRateLimitConfig, RequestRateLimiter, RuntimeCacheConfig, RuntimeCacheStores,
|
||||
RuntimeExecutor, RuntimeLimits, SecretCrypto,
|
||||
RuntimeLimits, SecretCrypto, community_default,
|
||||
};
|
||||
|
||||
#[tokio::main]
|
||||
@@ -66,8 +66,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let cache_stores = RuntimeCacheStores::from_config(&cache_config).await?;
|
||||
let api_rate_limit = admin_api_rate_limit_config_from_env()?;
|
||||
let secret_crypto = SecretCrypto::new(&env::var("CRANK_MASTER_KEY")?)?;
|
||||
let runtime = RuntimeExecutor::with_limits(runtime_limits)
|
||||
.with_response_cache_store(cache_stores.response.clone());
|
||||
let runtime = community_default()
|
||||
.with_limits(runtime_limits)
|
||||
.with_response_cache(cache_stores.response.clone())
|
||||
.build();
|
||||
let service = AdminService::new_with_runtime(
|
||||
registry,
|
||||
storage_root,
|
||||
|
||||
Reference in New Issue
Block a user