pub struct HttpSource { /* private fields */ }Implementations§
Source§impl HttpSource
impl HttpSource
pub fn new(cfg: HttpSourceConfig) -> Self
pub async fn iter_documents(&self) -> Result<Vec<Document>>
Trait Implementations§
Source§impl IncrementalSource for HttpSource
impl IncrementalSource for HttpSource
Source§type Cursor = BTreeMap<String, HttpUrlCursor>
type Cursor = BTreeMap<String, HttpUrlCursor>
Per-source cursor type. Must serde-round-trip (so the consumer can
persist it as JSON / YAML / a column).
Source§fn empty_cursor(&self) -> Self::Cursor
fn empty_cursor(&self) -> Self::Cursor
Initial cursor for a never-synced state. Returned by the consumer’s
first call before any documents are emitted.
Source§fn iter_changes_since(
&self,
cursor: &Self::Cursor,
) -> impl Future<Output = Result<Vec<Document>>> + Send
fn iter_changes_since( &self, cursor: &Self::Cursor, ) -> impl Future<Output = Result<Vec<Document>>> + Send
Stream documents changed since
cursor. May return
Err(StaleCursorError::new(...).into()) to signal the cursor is too
old; consumer should retry with empty_cursor().Source§fn cursor_from(&self, last_document: &Document) -> Self::Cursor
fn cursor_from(&self, last_document: &Document) -> Self::Cursor
Per-doc cursor DELTA. See trait docs for merge contract.
Auto Trait Implementations§
impl !Freeze for HttpSource
impl RefUnwindSafe for HttpSource
impl Send for HttpSource
impl Sync for HttpSource
impl Unpin for HttpSource
impl UnsafeUnpin for HttpSource
impl UnwindSafe for HttpSource
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
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