pub struct HttpAdapter { /* private fields */ }Expand description
The HTTP adapter: executes ops as HTTP requests.
Implementations§
Source§impl HttpAdapter
impl HttpAdapter
Sourcepub fn with_config(config: HttpConfig) -> Self
pub fn with_config(config: HttpConfig) -> Self
Create with explicit config.
Trait Implementations§
Source§impl Default for HttpAdapter
impl Default for HttpAdapter
Source§impl DriverAdapter for HttpAdapter
impl DriverAdapter for HttpAdapter
Source§fn known_op_fields(&self) -> Option<&'static [&'static str]>
fn known_op_fields(&self) -> Option<&'static [&'static str]>
HTTP adapter reads a closed vocabulary of op fields:
request-shape (method, uri / url), body framing
(content_type, body), and header overrides
(headers). Declaring the list opts this adapter into
SRD 30’s unknown-field guard — typos like bdoy: or
misplaced core directives surface at init time rather
than silently becoming ResolvedFields the adapter never
looks at.
Source§fn map_op<'a>(
&'a self,
template: &'a ParsedOp,
parent: Arc<dyn Kernel>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn OpDispenser>, String>> + Send + 'a>>
fn map_op<'a>( &'a self, template: &'a ParsedOp, parent: Arc<dyn Kernel>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn OpDispenser>, String>> + Send + 'a>>
Map an op template into a dispenser. Called once per unique op
template at activity startup — before any cycles execute. Read more
Source§fn default_status_metrics(&self) -> Vec<StatusMetric>
fn default_status_metrics(&self) -> Vec<StatusMetric>
Default metric names to display on the status line for this adapter. Read more
Source§fn display_preference(&self) -> DisplayPreference
fn display_preference(&self) -> DisplayPreference
Preferred display mode for this adapter. Read more
Source§fn known_op_params(&self) -> &'static [&'static str]
fn known_op_params(&self) -> &'static [&'static str]
Adapter-specific params keys allowed under an op’s
top-level
params (not op) section. Returned keys
extend the core’s crate::validation::CORE_OP_PARAMS
allow-list at op-validation time. Default: empty —
adapters that don’t need extras simply rely on the
core vocab. Override to declare adapter-only params
(e.g. CQL’s cl: consistency-level overrides if those
were lifted from op to params someday).Source§fn declare_controls(&self, _parent: &Arc<RwLock<Component>>)
fn declare_controls(&self, _parent: &Arc<RwLock<Component>>)
Declare adapter-specific dynamic controls (SRD 23) on a
subcomponent attached to the activity’s component. Called
once per activity, after the activity declares its own
concurrency / rate controls. The default no-op fits
adapters that have no adapter-level dynamic knobs. Read moreSource§fn shutdown<'a>(&'a self) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
fn shutdown<'a>(&'a self) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
Async teardown hook fired by the resource pool when a
shared adapter’s last reference detaches (or at session
shutdown). Default: no-op — drop is enough for adapters
whose underlying driver closes synchronously in its
destructor. Read more
Source§fn accessor_payload(&self) -> Option<Arc<dyn Any + Send + Sync>>
fn accessor_payload(&self) -> Option<Arc<dyn Any + Send + Sync>>
SRD-104 — the adapter’s accessor payload: a type-erased handle
(
Arc<dyn Any + Send + Sync>) a kernel node can obtain by fingerprint
through its kernel tree’s resource scope (ResourceScope::lookup). The resource pool surfaces this
through crate::resource_pool::SharedResource::accessor_payload
(the pool-shared wrapper delegates here) and stores it on the entry at
init. Default None — an adapter opts in only when it wants kernels
to reach a live handle (the first consumer is the CQL session handle,
SRD-103). Built over the adapter’s own connected session, so the
payload and the op-execution path share one resource.Auto Trait Implementations§
impl !RefUnwindSafe for HttpAdapter
impl !UnwindSafe for HttpAdapter
impl Freeze for HttpAdapter
impl Send for HttpAdapter
impl Sync for HttpAdapter
impl Unpin for HttpAdapter
impl UnsafeUnpin for HttpAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more