pub trait AdminRpc:
Sized
+ Send
+ Sync
+ 'static {
type Metadata: Metadata;
Show 29 methods
// Required methods
fn exit(&self, meta: Self::Metadata) -> Result<()>;
fn pid(&self, meta: Self::Metadata) -> Result<u32>;
fn reload_plugin(
&self,
meta: Self::Metadata,
name: String,
config_file: String,
) -> BoxFuture<Result<()>>;
fn unload_plugin(
&self,
meta: Self::Metadata,
name: String,
) -> BoxFuture<Result<()>>;
fn load_plugin(
&self,
meta: Self::Metadata,
config_file: String,
) -> BoxFuture<Result<String>>;
fn list_plugins(
&self,
meta: Self::Metadata,
) -> BoxFuture<Result<Vec<String>>>;
fn rpc_addr(&self, meta: Self::Metadata) -> Result<Option<SocketAddr>>;
fn set_log_filter(&self, filter: String) -> Result<()>;
fn start_time(&self, meta: Self::Metadata) -> Result<SystemTime>;
fn start_progress(
&self,
meta: Self::Metadata,
) -> Result<ValidatorStartProgress>;
fn add_authorized_voter(
&self,
meta: Self::Metadata,
keypair_file: String,
) -> Result<()>;
fn add_authorized_voter_from_bytes(
&self,
meta: Self::Metadata,
keypair: Vec<u8>,
) -> Result<()>;
fn remove_all_authorized_voters(&self, meta: Self::Metadata) -> Result<()>;
fn set_identity(
&self,
meta: Self::Metadata,
keypair_file: String,
require_tower: bool,
require_vote_history: bool,
) -> Result<()>;
fn set_identity_from_bytes(
&self,
meta: Self::Metadata,
identity_keypair: Vec<u8>,
require_tower: bool,
require_vote_history: bool,
) -> Result<()>;
fn set_staked_nodes_overrides(
&self,
meta: Self::Metadata,
path: String,
) -> Result<()>;
fn contact_info(&self, meta: Self::Metadata) -> Result<AdminRpcContactInfo>;
fn vat_status(
&self,
meta: Self::Metadata,
) -> Result<AdminRpcValidatorAdmissionTicketStatus>;
fn select_active_interface(
&self,
meta: Self::Metadata,
interface: IpAddr,
) -> Result<()>;
fn repair_shred_from_peer(
&self,
meta: Self::Metadata,
pubkey: Option<Pubkey>,
slot: u64,
shred_index: u64,
) -> Result<()>;
fn repair_whitelist(
&self,
meta: Self::Metadata,
) -> Result<AdminRpcRepairWhitelist>;
fn set_repair_whitelist(
&self,
meta: Self::Metadata,
whitelist: Vec<Pubkey>,
) -> Result<()>;
fn set_public_tpu_address(
&self,
meta: Self::Metadata,
public_tpu_addr: SocketAddr,
) -> Result<()>;
fn set_public_tpu_forwards_address(
&self,
meta: Self::Metadata,
public_tpu_forwards_addr: SocketAddr,
) -> Result<()>;
fn set_public_tvu_address(
&self,
meta: Self::Metadata,
public_tvu_addr: SocketAddr,
) -> Result<()>;
fn manage_block_production(
&self,
meta: Self::Metadata,
block_production_method: BlockProductionMethod,
transaction_struct: TransactionStructure,
num_workers: NonZeroUsize,
scheduler_pacing: SchedulerPacing,
) -> Result<()>;
fn is_generating_snapshots(&self, meta: Self::Metadata) -> Result<bool>;
fn blockstore_purge(
&self,
meta: Self::Metadata,
maximum_purge_slot: Slot,
) -> Result<()>;
// Provided method
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... }
}Required Associated Types§
Required Methods§
Sourcefn exit(&self, meta: Self::Metadata) -> Result<()>
fn exit(&self, meta: Self::Metadata) -> Result<()>
Initiates validator exit; exit is asynchronous so the validator will almost certainly still be running when this method returns
fn reload_plugin( &self, meta: Self::Metadata, name: String, config_file: String, ) -> BoxFuture<Result<()>>
fn unload_plugin( &self, meta: Self::Metadata, name: String, ) -> BoxFuture<Result<()>>
fn load_plugin( &self, meta: Self::Metadata, config_file: String, ) -> BoxFuture<Result<String>>
fn list_plugins(&self, meta: Self::Metadata) -> BoxFuture<Result<Vec<String>>>
fn rpc_addr(&self, meta: Self::Metadata) -> Result<Option<SocketAddr>>
fn set_log_filter(&self, filter: String) -> Result<()>
fn start_time(&self, meta: Self::Metadata) -> Result<SystemTime>
fn start_progress(&self, meta: Self::Metadata) -> Result<ValidatorStartProgress>
fn set_identity( &self, meta: Self::Metadata, keypair_file: String, require_tower: bool, require_vote_history: bool, ) -> Result<()>
fn set_identity_from_bytes( &self, meta: Self::Metadata, identity_keypair: Vec<u8>, require_tower: bool, require_vote_history: bool, ) -> Result<()>
fn set_staked_nodes_overrides( &self, meta: Self::Metadata, path: String, ) -> Result<()>
fn contact_info(&self, meta: Self::Metadata) -> Result<AdminRpcContactInfo>
fn vat_status( &self, meta: Self::Metadata, ) -> Result<AdminRpcValidatorAdmissionTicketStatus>
fn select_active_interface( &self, meta: Self::Metadata, interface: IpAddr, ) -> Result<()>
fn repair_shred_from_peer( &self, meta: Self::Metadata, pubkey: Option<Pubkey>, slot: u64, shred_index: u64, ) -> Result<()>
fn repair_whitelist( &self, meta: Self::Metadata, ) -> Result<AdminRpcRepairWhitelist>
fn set_repair_whitelist( &self, meta: Self::Metadata, whitelist: Vec<Pubkey>, ) -> Result<()>
fn set_public_tpu_address( &self, meta: Self::Metadata, public_tpu_addr: SocketAddr, ) -> Result<()>
fn set_public_tpu_forwards_address( &self, meta: Self::Metadata, public_tpu_forwards_addr: SocketAddr, ) -> Result<()>
fn set_public_tvu_address( &self, meta: Self::Metadata, public_tvu_addr: SocketAddr, ) -> Result<()>
fn manage_block_production( &self, meta: Self::Metadata, block_production_method: BlockProductionMethod, transaction_struct: TransactionStructure, num_workers: NonZeroUsize, scheduler_pacing: SchedulerPacing, ) -> Result<()>
fn is_generating_snapshots(&self, meta: Self::Metadata) -> Result<bool>
fn blockstore_purge( &self, meta: Self::Metadata, maximum_purge_slot: Slot, ) -> Result<()>
Provided Methods§
Sourcefn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
Create an IoDelegate, wiring rpc calls to the trait methods.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".