pub struct ShardHandler { /* private fields */ }
Expand description
Shard handler for managing shards
Implementations§
Source§impl ShardHandler
impl ShardHandler
pub fn new(client: RestClient) -> Self
Sourcepub async fn stats(&self, uid: &str) -> Result<ShardStats>
pub async fn stats(&self, uid: &str) -> Result<ShardStats>
Get shard statistics
Sourcepub async fn stats_metric(
&self,
uid: &str,
metric: &str,
) -> Result<MetricResponse>
pub async fn stats_metric( &self, uid: &str, metric: &str, ) -> Result<MetricResponse>
Get shard statistics for a specific metric
Sourcepub async fn list_by_database(&self, bdb_uid: u32) -> Result<Vec<Shard>>
pub async fn list_by_database(&self, bdb_uid: u32) -> Result<Vec<Shard>>
Get shards for a specific database
Sourcepub async fn list_by_node(&self, node_uid: u32) -> Result<Vec<Shard>>
pub async fn list_by_node(&self, node_uid: u32) -> Result<Vec<Shard>>
Get shards for a specific node
Sourcepub async fn failover_all(&self, body: ShardActionRequest) -> Result<Action>
pub async fn failover_all(&self, body: ShardActionRequest) -> Result<Action>
Global failover - POST /v1/shards/actions/failover
Sourcepub async fn migrate_all(&self, body: ShardActionRequest) -> Result<Action>
pub async fn migrate_all(&self, body: ShardActionRequest) -> Result<Action>
Global migrate - POST /v1/shards/actions/migrate
Auto Trait Implementations§
impl Freeze for ShardHandler
impl !RefUnwindSafe for ShardHandler
impl Send for ShardHandler
impl Sync for ShardHandler
impl Unpin for ShardHandler
impl !UnwindSafe for ShardHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more