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

Address

A CPG address entry returned in the callbacks

CpgIntoIter
CpgIter

struct returned from iterating over a CpgIterStart

CpgIterStart

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

Model1Data

Data for model1 initialize

RingId

RingId returned by totem_confchg_fn

Enums

CpgIterType

Type of iteration for CpgIterStart

FlowControlState

Flow control state returned from flow_control_state_get

Guarantee

Totem delivery guarantee options for mcast_joined

Model1Flags

No flags current specified for model1 so leave this at None

ModelData

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