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§
- Address
- A CPG address entry returned in the callbacks
- CpgInto
Iter - CpgIter
- struct returned from iterating over a CpgIterStart
- CpgIter
Start - An object to iterate over a list of CPG groups, create one of these and then use ‘for’ over it
- Handle
- A handle into the cpg library. Returned from initialize and needed for all other calls
- Model1
Data - Data for model1 initialize
- RingId
- RingId returned by totem_confchg_fn
Enums§
- CpgIter
Type - Type of iteration for CpgIterStart
- Flow
Control State - Flow control state returned from flow_control_state_get
- Guarantee
- Totem delivery guarantee options for mcast_joined
- Model1
Flags - No flags current specified for model1 so leave this at None
- Model
Data - Modeldata for initialize, only v1 supported at the moment
- Reason
- Reason for cpg item callback
Functions§
- context_
get - 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
- context_
set - 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
- dispatch
- Call any/all active CPG callbacks for this Handle see DispatchFlags for details
- fd_get
- Returns a file descriptor to use for poll/select on the CPG handle
- finalize
- Finish with a connection to corosync
- flow_
control_ state_ get - Get the flow control state of corosync CPG
- initialize
- 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.
- join
- Joins a CPG group for sending and receiving messages
- leave
- 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
- local_
get - Get the local node ID
- max_
atomic_ msgsize_ get - 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
- mcast_
joined - Send a message to the currently joined CPG group
- membership_
get - Get a list of members of a CPG group as a vector of Address structs