Struct mz_storage::source::pubnub::PubNubSourceReader
source · [−]pub struct PubNubSourceReader {
channel: Name,
pubnub: PubNub,
stream: Option<Pin<Box<Subscription<DefaultRuntime>>>>,
}
Expand description
Information required to sync data from PubNub
Fields
channel: Name
pubnub: PubNub
stream: Option<Pin<Box<Subscription<DefaultRuntime>>>>
Trait Implementations
sourceimpl SourceReader for PubNubSourceReader
impl SourceReader for PubNubSourceReader
type Key = ()
type Value = Row
type Diff = ()
sourcefn new(
_source_name: String,
_source_id: GlobalId,
_worker_id: usize,
_worker_count: usize,
_consumer_activator: SyncActivator,
connection: SourceConnection,
_restored_offsets: Vec<(PartitionId, Option<MzOffset>)>,
_encoding: SourceDataEncoding,
_: SourceBaseMetrics,
_: ConnectionContext
) -> Result<Self, Error>
fn new(
_source_name: String,
_source_id: GlobalId,
_worker_id: usize,
_worker_count: usize,
_consumer_activator: SyncActivator,
connection: SourceConnection,
_restored_offsets: Vec<(PartitionId, Option<MzOffset>)>,
_encoding: SourceDataEncoding,
_: SourceBaseMetrics,
_: ConnectionContext
) -> Result<Self, Error>
Create a new source reader. Read more
sourcefn next<'life0, 'async_trait>(
&'life0 mut self,
timestamp_frequency: Duration
) -> Pin<Box<dyn Future<Output = Option<Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
timestamp_frequency: Duration
) -> Pin<Box<dyn Future<Output = Option<Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the next message available from the source. Read more
sourcefn get_next_message(
&mut self
) -> Result<NextMessage<Self::Key, Self::Value, Self::Diff>, SourceReaderError>
fn get_next_message(
&mut self
) -> Result<NextMessage<Self::Key, Self::Value, Self::Diff>, SourceReaderError>
Returns the next message available from the source. Read more
sourcefn into_stream<'a>(
self,
timestamp_frequency: Duration
) -> LocalBoxStream<'a, Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>> where
Self: Sized + 'a,
fn into_stream<'a>(
self,
timestamp_frequency: Duration
) -> LocalBoxStream<'a, Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>> where
Self: Sized + 'a,
Returns an adapter that treats the source as a stream. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PubNubSourceReader
impl Send for PubNubSourceReader
impl Sync for PubNubSourceReader
impl Unpin for PubNubSourceReader
impl !UnwindSafe for PubNubSourceReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<P, R> ProtoType<R> for P where
R: RustType<P>,
impl<P, R> ProtoType<R> for P where
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See RustType::from_proto
.
sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See RustType::into_proto
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more