Module rpc

Source
Expand description

gRPC-based implementations of Persist PubSub client and server.

Structs§

GrpcPubSubClient
A PersistPubSubClient implementation backed by gRPC.
GrpcPubSubSender 🔒
An internal, gRPC-backed implementation of PubSubSender.
MetricsSameProcessPubSubSender
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.
NoopPubSubSender 🔒
PersistGrpcPubSubServer
A gRPC-based implementation of a Persist PubSub server.
PersistPubSubClientConfig
Client configuration for connecting to a remote PubSub server.
PubSubClientConnection
Wrapper type for a matching PubSubSender and PubSubReceiver client pair.
PubSubConnection 🔒
An active connection managed by PubSubState.
PubSubState 🔒
Internal state of a PubSub server implementation.
ShardSubscriptionToken
A token corresponding to a subscription to diffs for a particular shard.
SubscriptionTrackingSender 🔒
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§

PersistPubSubClient
Top-level Trait to create a PubSubClient.
PubSubReceiver
The receive-side client to Persist PubSub.
PubSubSender
The public send-side client to Persist PubSub.
PubSubSenderInternal 🔒
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.