pub trait AdminRpc:
Sized
+ Send
+ Sync
+ 'static {
type Metadata: Metadata;
Show 24 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,
) -> Result<()>;
fn set_identity_from_bytes(
&self,
meta: Self::Metadata,
identity_keypair: Vec<u8>,
require_tower: bool,
) -> Result<()>;
fn set_staked_nodes_overrides(
&self,
meta: Self::Metadata,
path: String,
) -> Result<()>;
fn contact_info(&self, meta: Self::Metadata) -> Result<AdminRpcContactInfo>;
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 get_secondary_index_key_size(
&self,
meta: Self::Metadata,
pubkey_str: String,
) -> Result<HashMap<RpcAccountIndex, usize>>;
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<()>;
// 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, ) -> Result<()>
fn set_identity_from_bytes( &self, meta: Self::Metadata, identity_keypair: Vec<u8>, require_tower: bool, ) -> Result<()>
fn set_staked_nodes_overrides( &self, meta: Self::Metadata, path: String, ) -> Result<()>
fn contact_info(&self, meta: Self::Metadata) -> Result<AdminRpcContactInfo>
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 get_secondary_index_key_size( &self, meta: Self::Metadata, pubkey_str: String, ) -> Result<HashMap<RpcAccountIndex, usize>>
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<()>
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", so this trait is not object safe.