Trait NodeDelegate

Source
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§

Source

fn gather_metrics(&self) -> Vec<MetricFamily>

Source

fn host_controller(&self) -> &HostController

Source

fn client_actor_index(&self) -> &ClientActorIndex

Source

fn sendgrid_controller(&self) -> Option<&SendGridController>

Source

fn public_key(&self) -> &DecodingKey

Return a JWT decoding key for verifying credentials.

Source

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.

Source

fn private_key(&self) -> &EncodingKey

Return a JWT encoding key for signing credentials.

Implementations on Foreign Types§

Source§

impl<T: NodeDelegate + ?Sized> NodeDelegate for Arc<T>

Implementors§