Module rust_corosync::cmap[][src]

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

Value returned from the iterator. contains the key name and the Data

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

A handle for a specific CMAP tracker. returned from track_add. There may be multiple TrackHandles per Handle

Tracker types for cmap, both passed into track_add and returned from its callback.

Enums

Data returned from the cmap::get() call and tracker & iterators. Contains the data itself and the type of that data.

The type of data returned from get or in a tracker callback or iterator, part of the Data struct

“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

Get a value from cmap, returned as a Data struct, so could be anything

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 Data type into cmap

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