Trait mz_persist_client::rpc::PubSubSenderInternal

source ·
trait PubSubSenderInternal:
    Debug
    + Send
    + Sync {
    // Required methods
    fn push_diff(&self, shard_id: &ShardId, diff: &VersionedData);
    fn subscribe(&self, shard_id: &ShardId);
    fn unsubscribe(&self, shard_id: &ShardId);
}
Expand description

The internal send-side client trait to Persist PubSub, responsible for issuing RPCs to the PubSub service. This trait is separated out from PubSubSender to keep the client implementations straightforward, while offering a more ergonomic public API in PubSubSender.

Required Methods§

source

fn push_diff(&self, shard_id: &ShardId, diff: &VersionedData)

Push a diff to subscribers.

source

fn subscribe(&self, shard_id: &ShardId)

Subscribe the corresponding PubSubReceiver to diffs for the given shard.

This call is idempotent and is a no-op for an already subscribed shard.

source

fn unsubscribe(&self, shard_id: &ShardId)

Unsubscribe the corresponding PubSubReceiver from diffs for the given shard.

This call is idempotent and is a no-op for already unsubscribed shards.

Implementors§