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.