pub struct ClusterHandler { /* private fields */ }
Expand description
Cluster handler for executing cluster commands
Implementations§
Source§impl ClusterHandler
impl ClusterHandler
pub fn new(client: RestClient) -> Self
Sourcepub async fn info(&self) -> Result<ClusterInfo>
pub async fn info(&self) -> Result<ClusterInfo>
Get cluster information (CLUSTER.INFO)
Sourcepub async fn bootstrap(&self, request: BootstrapRequest) -> Result<Value>
pub async fn bootstrap(&self, request: BootstrapRequest) -> Result<Value>
Bootstrap a new cluster (CLUSTER.BOOTSTRAP)
Sourcepub async fn update(&self, updates: Value) -> Result<Value>
pub async fn update(&self, updates: Value) -> Result<Value>
Update cluster configuration (CLUSTER.UPDATE)
Sourcepub async fn license(&self) -> Result<LicenseInfo>
pub async fn license(&self) -> Result<LicenseInfo>
Get cluster license (CLUSTER.LICENSE)
Sourcepub async fn join_node(
&self,
node_address: &str,
username: &str,
password: &str,
) -> Result<Value>
pub async fn join_node( &self, node_address: &str, username: &str, password: &str, ) -> Result<Value>
Join node to cluster (CLUSTER.JOIN)
Sourcepub async fn remove_node(&self, node_uid: u32) -> Result<Value>
pub async fn remove_node(&self, node_uid: u32) -> Result<Value>
Remove node from cluster (CLUSTER.REMOVE_NODE)
Sourcepub async fn reset(&self) -> Result<ClusterActionResponse>
pub async fn reset(&self) -> Result<ClusterActionResponse>
Reset cluster to factory defaults (CLUSTER.RESET) - DANGEROUS
Sourcepub async fn recover(&self) -> Result<ClusterActionResponse>
pub async fn recover(&self) -> Result<ClusterActionResponse>
Recover cluster from failure (CLUSTER.RECOVER)
Sourcepub async fn actions(&self) -> Result<Value>
pub async fn actions(&self) -> Result<Value>
List available cluster actions - GET /v1/cluster/actions
Sourcepub async fn action_detail(&self, action: &str) -> Result<Value>
pub async fn action_detail(&self, action: &str) -> Result<Value>
Get a specific cluster action details - GET /v1/cluster/actions/{action}
Sourcepub async fn action_execute(&self, action: &str, body: Value) -> Result<Value>
pub async fn action_execute(&self, action: &str, body: Value) -> Result<Value>
Execute a specific cluster action - POST /v1/cluster/actions/{action}
Sourcepub async fn action_delete(&self, action: &str) -> Result<()>
pub async fn action_delete(&self, action: &str) -> Result<()>
Delete a specific cluster action - DELETE /v1/cluster/actions/{action}
Sourcepub async fn auditing_db_conns(&self) -> Result<Value>
pub async fn auditing_db_conns(&self) -> Result<Value>
Get auditing DB connections - GET /v1/cluster/auditing/db_conns
Sourcepub async fn auditing_db_conns_update(&self, cfg: Value) -> Result<Value>
pub async fn auditing_db_conns_update(&self, cfg: Value) -> Result<Value>
Update auditing DB connections - PUT /v1/cluster/auditing/db_conns
Sourcepub async fn auditing_db_conns_delete(&self) -> Result<()>
pub async fn auditing_db_conns_delete(&self) -> Result<()>
Delete auditing DB connections - DELETE /v1/cluster/auditing/db_conns
Sourcepub async fn certificates(&self) -> Result<Value>
pub async fn certificates(&self) -> Result<Value>
List cluster certificates - GET /v1/cluster/certificates
Sourcepub async fn certificate_delete(&self, uid: u32) -> Result<()>
pub async fn certificate_delete(&self, uid: u32) -> Result<()>
Delete a certificate - DELETE /v1/cluster/certificates/{uid}
Sourcepub async fn certificates_rotate(&self) -> Result<Value>
pub async fn certificates_rotate(&self) -> Result<Value>
Rotate certificates - POST /v1/cluster/certificates/rotate
Sourcepub async fn update_cert(&self, body: Value) -> Result<Value>
pub async fn update_cert(&self, body: Value) -> Result<Value>
Update certificate bundle - PUT /v1/cluster/update_cert
Sourcepub async fn ldap_delete(&self) -> Result<()>
pub async fn ldap_delete(&self) -> Result<()>
Delete LDAP configuration - DELETE /v1/cluster/ldap
Sourcepub async fn module_capabilities(&self) -> Result<Value>
pub async fn module_capabilities(&self) -> Result<Value>
Get cluster module capabilities - GET /v1/cluster/module-capabilities
Sourcepub async fn policy_update(&self, policy: Value) -> Result<Value>
pub async fn policy_update(&self, policy: Value) -> Result<Value>
Update cluster policy - PUT /v1/cluster/policy
Sourcepub async fn policy_restore_default(&self) -> Result<Value>
pub async fn policy_restore_default(&self) -> Result<Value>
Restore default cluster policy - PUT /v1/cluster/policy/restore_default
Sourcepub async fn services_configuration(&self) -> Result<Value>
pub async fn services_configuration(&self) -> Result<Value>
Get services configuration - GET /v1/cluster/services_configuration
Sourcepub async fn services_configuration_update(&self, cfg: Value) -> Result<Value>
pub async fn services_configuration_update(&self, cfg: Value) -> Result<Value>
Update services configuration - PUT /v1/cluster/services_configuration
Sourcepub async fn witness_disk(&self) -> Result<Value>
pub async fn witness_disk(&self) -> Result<Value>
Get witness disk info - GET /v1/cluster/witness_disk
Sourcepub async fn alert_detail(&self, alert: &str) -> Result<Value>
pub async fn alert_detail(&self, alert: &str) -> Result<Value>
Get specific cluster alert detail - GET /v1/cluster/alerts/{alert}