Module mz_persist_client::rpc
source ยท Expand description
gRPC-based implementations of Persist PubSub client and server.
Structsยง
- A PersistPubSubClient implementation backed by gRPC.
- Grpc
PubSub ๐Sender An internal, gRPC-backed implementation of PubSubSender. - A wrapper intended to provide client-side metrics for a connection that communicates directly with the server state, such as one created by PersistGrpcPubSubServer::new_same_process_connection.
- Noop
PubSub ๐Sender - A gRPC-based implementation of a Persist PubSub server.
- Client configuration for connecting to a remote PubSub server.
- Wrapper type for a matching PubSubSender and PubSubReceiver client pair.
- PubSub
Connection ๐An active connection managed by PubSubState. - PubSub
State ๐Internal state of a PubSub server implementation. - A token corresponding to a subscription to diffs for a particular shard.
- An wrapper for a PubSubSenderInternal that implements PubSubSender by maintaining a map of active shard subscriptions to their tokens.
Constantsยง
- A gRPC metadata key to indicate the caller id of a client.
- Determines whether PubSub clients should connect to the PubSub server.
- For connected clients, determines whether to push state diffs to the PubSub server. For the server, determines whether to broadcast state diffs to subscribed clients.
- For connected clients, determines whether to push state diffs to the PubSub server. For the server, determines whether to broadcast state diffs to subscribed clients.
Traitsยง
- Top-level Trait to create a PubSubClient.
- The receive-side client to Persist PubSub.
- The public send-side client to Persist PubSub.
- PubSub
Sender ๐Internal 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.
Functionsยง
- Spawns a Tokio task that consumes a PubSubReceiver, applying its diffs to a StateCache.