Trait solana_accountsdb_plugin_interface::accountsdb_plugin_interface::AccountsDbPlugin [−][src]
pub trait AccountsDbPlugin: Any + Send + Sync + Debug {
fn name(&self) -> &'static str;
fn update_account(
&mut self,
account: ReplicaAccountInfoVersions<'_>,
slot: u64,
is_startup: bool
) -> Result<()>;
fn notify_end_of_startup(&mut self) -> Result<()>;
fn update_slot_status(
&mut self,
slot: u64,
parent: Option<u64>,
status: SlotStatus
) -> Result<()>;
fn on_load(&mut self, _config_file: &str) -> Result<()> { ... }
fn on_unload(&mut self) { ... }
}
Required methods
fn update_account(
&mut self,
account: ReplicaAccountInfoVersions<'_>,
slot: u64,
is_startup: bool
) -> Result<()>
fn update_account(
&mut self,
account: ReplicaAccountInfoVersions<'_>,
slot: u64,
is_startup: bool
) -> Result<()>
Called when an account is updated at a slot.
fn notify_end_of_startup(&mut self) -> Result<()>
fn notify_end_of_startup(&mut self) -> Result<()>
Called when all accounts are notified of during startup.
fn update_slot_status(
&mut self,
slot: u64,
parent: Option<u64>,
status: SlotStatus
) -> Result<()>
fn update_slot_status(
&mut self,
slot: u64,
parent: Option<u64>,
status: SlotStatus
) -> Result<()>
Called when a slot status is updated
Provided methods
The callback called when a plugin is loaded by the system, used for doing whatever initialization is required by the plugin. The _config_file contains the name of the of the config file. The config must be in JSON format and include a field “libpath” indicating the full path name of the shared library implementing this interface.