Усилить безопасность и надёжность выполнения операций
CI / Rust Checks (push) Successful in 5m7s
CI / UI Checks (push) Successful in 4s
CI / Deployment Manifests (push) Successful in 3s
CI / Frontend E2E (push) Successful in 3m9s
CI / Deploy (push) Successful in 1m41s

This commit is contained in:
2026-07-11 14:08:07 +03:00
parent 626f2845e2
commit 8318e4b560
40 changed files with 1343 additions and 185 deletions
+11 -1
View File
@@ -1,6 +1,6 @@
use std::sync::Arc;
use crank_adapter_rest::RestAdapter;
use crank_adapter_rest::{OutboundHttpPolicy, RestAdapter, RestAdapterError};
use crank_core::{
AdapterRegistry, CoordinationStateStore, MeteringSink, NoopMeteringSink, ResponseCacheStore,
SharedMeteringSink, SharedProtocolAdapter,
@@ -73,3 +73,13 @@ pub fn community_default() -> RuntimeExecutorBuilder {
RuntimeExecutorBuilder::new()
.register_adapter(Arc::new(RestAdapter::new()) as SharedProtocolAdapter)
}
pub fn community_from_env() -> Result<RuntimeExecutorBuilder, RestAdapterError> {
Ok(RuntimeExecutorBuilder::new()
.register_adapter(Arc::new(RestAdapter::from_env()?) as SharedProtocolAdapter))
}
pub fn community_with_outbound_policy(policy: OutboundHttpPolicy) -> RuntimeExecutorBuilder {
RuntimeExecutorBuilder::new()
.register_adapter(Arc::new(RestAdapter::with_policy(policy)) as SharedProtocolAdapter)
}