Module rust_corosync::cpg[][src]

Expand description

cpg is the Control Process Groups subsystem of corosync and is usually used for sending messages around the cluster. All processes using CPG belong to a named group (whose members they can query) and all messages are sent with delivery guarantees.

Structs

A CPG address entry returned in the callbacks

struct returned from iterating over a CpgIterStart

An object to iterate over a list of CPG groups, create one of these and then use ‘for’ over it

A handle into the cpg library. Returned from initialize and needed for all other calls

Data for model1 initialize

RingId returned by totem_confchg_fn

Enums

Type of iteration for CpgIterStart

Flow control state returned from flow_control_state_get

Totem delivery guarantee options for mcast_joined

No flags current specified for model1 so leave this at None

Modeldata for initialize, only v1 supported at the moment

Reason for cpg item callback

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

Call any/all active CPG callbacks for this Handle see DispatchFlags for details

Returns a file descriptor to use for poll/select on the CPG handle

Finish with a connection to corosync

Get the flow control state of corosync CPG

Initialize a connection to the cpg library. You must call this before doing anything else and use the passed back Handle. Remember to free the handle using finalize when finished.

Joins a CPG group for sending and receiving messages

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

Get the local node ID

Get the maximum size that CPG can send in one corosync message, any messages sent via mcast_joined that are larger than this will be fragmented

Send a message to the currently joined CPG group

Get a list of members of a CPG group as a vector of Address structs