MCPcopy Create free account
hub / github.com/corosync/corosync / leave

Function leave

bindings/rust/src/cpg.rs:415–425  ·  view source on GitHub ↗

Leave the currently joined CPG group, another group can now be joined on the same [Handle] or [finalize] can be called to finish using CPG

(handle: &Handle, group: &str)

Source from the content-addressed store, hash-verified

413/// Leave the currently joined CPG group, another group can now be joined on
414/// the same [Handle] or [finalize] can be called to finish using CPG
415pub fn leave(handle: &Handle, group: &str) -> Result<()> {
416 let res = unsafe {
417 let c_group = string_to_cpg_name(group)?;
418 ffi::cpg_leave(handle.cpg_handle, &c_group)
419 };
420 if res == ffi::CS_OK {
421 Ok(())
422 } else {
423 Err(CsError::from_c(res))
424 }
425}
426
427/// Get the local node ID
428pub fn local_get(handle: &Handle) -> Result<NodeId> {

Callers

nothing calls this directly

Calls 2

string_to_cpg_nameFunction · 0.85
cpg_leaveFunction · 0.85

Tested by

no test coverage detected