Expand description
gRPC-based implementations of Persist PubSub client and server.
Structs§
- Grpc
PubSub Client - A PersistPubSubClient implementation backed by gRPC.
- Grpc
PubSub 🔒Sender - An internal, gRPC-backed implementation of PubSubSender.
- Metrics
Same Process PubSub Sender - 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 - Persist
Grpc PubSub Server - A gRPC-based implementation of a Persist PubSub server.
- Persist
PubSub Client Config - Client configuration for connecting to a remote PubSub server.
- PubSub
Client Connection - 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.
- Shard
Subscription Token - A token corresponding to a subscription to diffs for a particular shard.
- Subscription
Tracking 🔒Sender - An wrapper for a PubSubSenderInternal that implements PubSubSender by maintaining a map of active shard subscriptions to their tokens.
Constants§
- PERSIST_
PUBSUB_ CALLER_ KEY - A gRPC metadata key to indicate the caller id of a client.
- PUBSUB_
CLIENT_ 🔒ENABLED - Determines whether PubSub clients should connect to the PubSub server.
- PUBSUB_
CLIENT_ 🔒RECEIVER_ CHANNEL_ SIZE - Size of channel used to buffer received messages from PubSub service.
- PUBSUB_
CLIENT_ 🔒SENDER_ CHANNEL_ SIZE - Size of channel used to buffer send messages to PubSub service.
- PUBSUB_
CONNECT_ 🔒ATTEMPT_ TIMEOUT - Timeout per connection attempt to Persist PubSub service.
- PUBSUB_
CONNECT_ 🔒MAX_ BACKOFF - Maximum backoff when retrying connection establishment to Persist PubSub service.
- PUBSUB_
PUSH_ 🔒DIFF_ ENABLED - 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.
- PUBSUB_
RECONNECT_ 🔒BACKOFF - Backoff after an established connection to Persist PubSub service fails.
- PUBSUB_
REQUEST_ 🔒TIMEOUT - Timeout per request attempt to Persist PubSub service.
- PUBSUB_
SAME_ 🔒PROCESS_ DELEGATE_ ENABLED - 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.
- PUBSUB_
SERVER_ 🔒CONNECTION_ CHANNEL_ SIZE - Size of channel used per connection to buffer broadcasted messages from PubSub server.
- PUBSUB_
STATE_ 🔒CACHE_ SHARD_ REF_ CHANNEL_ SIZE - Size of channel used by the state cache to broadcast shard state references.
Traits§
- Persist
PubSub Client - Top-level Trait to create a PubSubClient.
- PubSub
Receiver - The receive-side client to Persist PubSub.
- PubSub
Sender - 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§
- create_
request 🔒 - subscribe_
state_ 🔒cache_ to_ pubsub - Spawns a Tokio task that consumes a PubSubReceiver, applying its diffs to a StateCache.