pub trait NodeDelegate: Send + Sync {
// Required methods
fn gather_metrics(&self) -> Vec<MetricFamily>;
fn host_controller(&self) -> &HostController;
fn client_actor_index(&self) -> &ClientActorIndex;
fn sendgrid_controller(&self) -> Option<&SendGridController>;
fn public_key(&self) -> &DecodingKey;
fn public_key_bytes(&self) -> &[u8] ⓘ;
fn private_key(&self) -> &EncodingKey;
}Expand description
Defines the state / environment of a SpacetimeDB node from the PoV of the client API.
Types returned here should be considered internal state and never be surfaced to the API.
Required Methods§
fn gather_metrics(&self) -> Vec<MetricFamily>
fn host_controller(&self) -> &HostController
fn client_actor_index(&self) -> &ClientActorIndex
fn sendgrid_controller(&self) -> Option<&SendGridController>
Sourcefn public_key(&self) -> &DecodingKey
fn public_key(&self) -> &DecodingKey
Return a JWT decoding key for verifying credentials.
Sourcefn public_key_bytes(&self) -> &[u8] ⓘ
fn public_key_bytes(&self) -> &[u8] ⓘ
Return the public key used to verify JWTs, as the bytes of a PEM public key file.
The /identity/public-key route calls this method to return the public key to callers.
Sourcefn private_key(&self) -> &EncodingKey
fn private_key(&self) -> &EncodingKey
Return a JWT encoding key for signing credentials.