Add destructive confirmation and import guidance
This commit is contained in:
@@ -2,8 +2,8 @@ use std::sync::Arc;
|
||||
|
||||
use crank_adapter_rest::RestAdapter;
|
||||
use crank_core::{
|
||||
AdapterRegistry, MeteringSink, NoopMeteringSink, ResponseCacheStore, SharedMeteringSink,
|
||||
SharedProtocolAdapter,
|
||||
AdapterRegistry, CoordinationStateStore, MeteringSink, NoopMeteringSink, ResponseCacheStore,
|
||||
SharedMeteringSink, SharedProtocolAdapter,
|
||||
};
|
||||
|
||||
use crate::{RuntimeExecutor, RuntimeLimits};
|
||||
@@ -12,6 +12,7 @@ pub struct RuntimeExecutorBuilder {
|
||||
limits: RuntimeLimits,
|
||||
adapters: AdapterRegistry,
|
||||
response_cache: Option<Arc<dyn ResponseCacheStore>>,
|
||||
coordination_store: Option<Arc<dyn CoordinationStateStore>>,
|
||||
metering_sink: SharedMeteringSink,
|
||||
}
|
||||
|
||||
@@ -21,6 +22,7 @@ impl RuntimeExecutorBuilder {
|
||||
limits: RuntimeLimits::default(),
|
||||
adapters: AdapterRegistry::empty(),
|
||||
response_cache: None,
|
||||
coordination_store: None,
|
||||
metering_sink: Arc::new(NoopMeteringSink) as Arc<dyn MeteringSink>,
|
||||
}
|
||||
}
|
||||
@@ -40,6 +42,11 @@ impl RuntimeExecutorBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_coordination_store(mut self, store: Arc<dyn CoordinationStateStore>) -> Self {
|
||||
self.coordination_store = Some(store);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_metering_sink(mut self, sink: SharedMeteringSink) -> Self {
|
||||
self.metering_sink = sink;
|
||||
self
|
||||
@@ -50,6 +57,7 @@ impl RuntimeExecutorBuilder {
|
||||
self.limits,
|
||||
self.adapters,
|
||||
self.response_cache,
|
||||
self.coordination_store,
|
||||
self.metering_sink,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user