Main interface to the OpFlex framework.
More...
Main interface to the OpFlex framework.
Add an OpFlex peer.
If the framework is started, this will immediately initiate a new connection asynchronously.
When connecting to the peer, that peer may provide an additional list of peers to connect to, which will be automatically added as peers. If the peer does not include itself in the list, then the framework will disconnect from that peer and add the peers in the list. In this way, it is possible to automatically bootstrap the correct set of peers using a known hostname or IP address or a known, fixed anycast IP address.
- Parameters
-
framework | the framework |
hostname | the hostname or IP address to connect to |
port | the TCP port to connect on |
- Returns
- a status code
Create a new OF framework instance.
You must eventually call offramework_destroy() on the returned object.
- Parameters
-
framework | a pointer to memory that will receive the pointer to the newly-allocated object. |
- Returns
- a status code
Destroy a OF Framework instance, and zero the pointer.
- Parameters
-
framework | a pointer to memory containing the OF framework pointer. |
- Returns
- a status code
register to listen to opflex peer connection status and health
- Parameters
-
framework | the framework |
obj | The peer status listener object created with ofpeerstatuslistener_cr eate. |
- Returns
- a status code
Add the given model metadata to the managed object database.
Must be called before offramework_start().
- Parameters
-
framework | the framework |
metadata | the model metadata to set |
- Returns
- a status code
ofstatus offramework_set_opflex_identity |
( |
offramework_p |
framework, |
|
|
const char * |
name, |
|
|
const char * |
domain |
|
) |
| |
Set the opflex identity information for this framework instance.
- Parameters
-
framework | the framework |
name | the unique name for this opflex component within the policy domain |
domain | the globally unique name for this policy domain |
- Returns
- a status code
Start the framework.
This will start all the framework threads and attempt to connect to configured OpFlex peers.
- Parameters
-
- Returns
- a status code
Cleanly stop the framework.
- Parameters
-
- Returns
- a status code