Module rust_corosync::cmap
source · Expand description
cmap is the internal ‘database’ of corosync - though it is NOT replicated. Mostly it contains a copy of the corosync.conf file and information about the running state of the daemon. The cmap API provides two ‘maps’. Icmap, which is as above, and Stats, which contains very detailed statistics on the running system, this includes network and IPC calls.
Structs
Create one of these to start iterating over cmap values.
A handle returned from initialize, needs to be passed to all other cmap API calls
Callback function called every time a tracker reports a change in a tracked value
Enums
Data returned from the cmap::get() call and tracker & iterators.
Contains the data itself and the type of that data.
“Maps” available to initialize
Functions
Get the current ‘context’ value for this handle
The context value is an arbitrary value that is always passed
back to callbacks to help identify the source
Set the current ‘context’ value for this handle
The context value is an arbitrary value that is always passed
back to callbacks to help identify the source.
Normally this is set in initialize, but this allows it to be changed
decrement the value in a cmap key (must be a numeric type)
Dispatch any/all active CMAP callbacks.
Takes a Handle as returned from initialize,
flags DispatchFlags tells it how many items to dispatch before returning
Return a file descriptor to use for poll/select on the CMAP handle.
Takes a Handle as returned from initialize,
returns a C file descriptor as i32
Finish with a connection to corosync.
Takes a Handle as returned from initialize
increment the value in a cmap key (must be a numeric type)
Initialize a connection to the cmap subsystem.
map specifies which cmap “map” to use.
Returns a Handle into the cmap library
Sets a binary value into cmap
Sets an i8 value into cmap
Sets an i16 value into cmap
Sets an i32 value into cmap
Sets an i64 value into cmap
Function to set a generic numeric value
This doesn’t work for strings or binaries
Sets a string value into cmap
Sets a u16 value into cmap
Sets a u32 value into cmap
Sets a u64 value into cmap
Track changes in cmap values, multiple TrackHandles per Handle are allowed
Remove a tracker frm this Handle