pub trait HttpDriver: Send + Sync {
type Session: Send + Sync;
// Required methods
fn connector_name(&self) -> &'static str;
fn batching(&self) -> HttpBatching;
fn session<'life0, 'life1, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
session: &'life2 Self::Session,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided methods
fn config_schema(&self) -> Value { ... }
fn dataset_uri(&self) -> String { ... }
fn call_context(&self) -> CallContext { ... }
fn check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
ctx: &'life2 CheckContext,
) -> Pin<Box<dyn Future<Output = Result<CheckReport, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn batch_atomicity(&self) -> BatchAtomicity { ... }
}Expand description
An HTTP destination’s primitives (RFC 0014). Wrap it in an
HttpSinkDriver, then a DriverSink.
Required Associated Types§
Required Methods§
Sourcefn connector_name(&self) -> &'static str
fn connector_name(&self) -> &'static str
The connector’s name.
Sourcefn batching(&self) -> HttpBatching
fn batching(&self) -> HttpBatching
How pages become requests.
Sourcefn session<'life0, 'life1, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn session<'life0, 'life1, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Prepare what one page’s requests share.
Sourcefn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
session: &'life2 Self::Session,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
session: &'life2 Self::Session,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Send one body. Ok once the endpoint accepted it.
Provided Methods§
Sourcefn config_schema(&self) -> Value
fn config_schema(&self) -> Value
The JSON Schema of the connector’s config.
Sourcefn dataset_uri(&self) -> String
fn dataset_uri(&self) -> String
The endpoint, for lineage (credential-free).
Sourcefn call_context(&self) -> CallContext
fn call_context(&self) -> CallContext
The connector’s own call defaults (its retry policy).
Sourcefn check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
ctx: &'life2 CheckContext,
) -> Pin<Box<dyn Future<Output = Result<CheckReport, FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
calls: &'life1 CallSlot,
ctx: &'life2 CheckContext,
) -> Pin<Box<dyn Future<Output = Result<CheckReport, FaucetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
A non-mutating preflight probe.
Sourcefn batch_atomicity(&self) -> BatchAtomicity
fn batch_atomicity(&self) -> BatchAtomicity
What a failed write leaves behind.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".