OpFlex Framework
1.3.0
|
An object that monitors for updates in that data store for individual connections to the opflex peers and overall status of the connection pool. More...
Modules | |
Peer Status Codes | |
Defines status codes for peer status updates. | |
Connection Pool Health Status Codes | |
cpeerstatus | |
Typedefs | |
typedef ofobj_p | ofpeerstatuslistener_p |
cpoolhealth More... | |
typedef void(* | ofpeerstatus_peer_p )(void *user_data, const char *peerhostname, int port, int status) |
A function pointer to receive peer status updates. More... | |
typedef void(* | ofpeerstatus_health_p )(void *user_data, int health) |
A function pointer to recieve connection pool health status updates. More... | |
Functions | |
ofstatus | ofpeerstatuslistener_create (void *user_data, ofpeerstatus_peer_p peer_callback, ofpeerstatus_health_p health_callback, ofpeerstatuslistener_p *obj) |
Creates peer status listener object. More... | |
ofstatus | ofpeerstatuslistener_destroy (ofpeerstatuslistener_p *obj) |
Destroy the peer status listener object, and zero the pointer. More... | |
An object that monitors for updates in that data store for individual connections to the opflex peers and overall status of the connection pool.
There are functions to create, destroy and register the object. During creation, the caller must arrange to pass two C function pointers which the C++ member listener functions of the object will call to send back the update information to the callers C code domain.
typedef void(* ofpeerstatus_health_p)(void *user_data, int health) |
A function pointer to recieve connection pool health status updates.
Called when the overall health of the opflex connection pool changes. Will not be called concurrently.
user_data | a pointer to an opaque user data structure |
health | status code for connection pool health. |
typedef void(* ofpeerstatus_peer_p)(void *user_data, const char *peerhostname, int port, int status) |
A function pointer to receive peer status updates.
Called when the connection state changes for a given Opflex peer. Will not be called concurrently.
user_data | a pointer to an opaque user data structure |
peerhostname | the hostname of the peer that was updated |
port | the port number of the peer that was updated |
status | the new status of the Opflex peer |
typedef ofobj_p ofpeerstatuslistener_p |
cpoolhealth
A pointer to peer status listener object
ofstatus ofpeerstatuslistener_create | ( | void * | user_data, |
ofpeerstatus_peer_p | peer_callback, | ||
ofpeerstatus_health_p | health_callback, | ||
ofpeerstatuslistener_p * | obj | ||
) |
Creates peer status listener object.
You must eventually call ofpeerstatuslistener_destroy on the returned object.
obj | return the pointer to created object |
user_data | an opaque data blob that will be passed to your handler |
peer_callback | caller provided function pointer for handling status callback of any peer |
health_callback | caller provided functional pointer for handling peer connection pool health callback |
ofstatus ofpeerstatuslistener_destroy | ( | ofpeerstatuslistener_p * | obj | ) |
Destroy the peer status listener object, and zero the pointer.
You must ensure that the listener is no longer being used by any framework objects.
obj | peer status listener obj |