The Sequence Toolkit
www.sequence-toolkit.com |
#include "stk_smartbeat.h"
#include "stk_service.h"
#include "stk_name_service.h"
#include "stk_env.h"
Go to the source code of this file.
Functions | |
stk_smartbeat_ctrl_t * | stk_create_smartbeat_ctrl (stk_env_t *env) |
stk_ret | stk_destroy_smartbeat_ctrl (stk_smartbeat_ctrl_t *smb) |
stk_ret | stk_smartbeat_update_current_time (stk_smartbeat_t *smb) |
int | stk_min_smartbeat_interval (stk_smartbeat_ctrl_t *smb) |
stk_ret | stk_smartbeat_add_service (stk_smartbeat_ctrl_t *smb, stk_service_t *svc) |
stk_ret | stk_smartbeat_remove_service (stk_smartbeat_ctrl_t *smb, stk_service_t *svc) |
stk_ret | stk_smartbeat_add_name_service (stk_smartbeat_ctrl_t *smb, stk_name_service_t *svc) |
stk_ret | stk_smartbeat_remove_name_service (stk_smartbeat_ctrl_t *smb, stk_name_service_t *svc) |
stk_bool | stk_has_smartbeat_timed_out (stk_smartbeat_t *sb, stk_smartbeat_t *curr_time, stk_uint32 ivl) |
The stk_smartbeat module provides APIs that implement and control the aggregation of heartbeats (smartbeats), and their communication to other STK components
stk_smartbeat_ctrl_t* stk_create_smartbeat_ctrl | ( | stk_env_t * | env | ) |
Create a Smartbeat controller. The Smartbeat controller is responsible for sending smart beats to other components.
env | Environment this controller should use |
stk_ret stk_destroy_smartbeat_ctrl | ( | stk_smartbeat_ctrl_t * | smb | ) |
Destroy a Smartbeat controller.
smb | Smartbeat controller to be destroyed |
stk_bool stk_has_smartbeat_timed_out | ( | stk_smartbeat_t * | sb, |
stk_smartbeat_t * | curr_time, | ||
stk_uint32 | ivl | ||
) |
Determine if a smartbeat has past an interval
sb | The smartbeat being tested |
curr_time | The current time (in smartbeat form) |
ivl | The interval to be checked |
int stk_min_smartbeat_interval | ( | stk_smartbeat_ctrl_t * | smb | ) |
Get the minimum time a smartbeat may occur.
stk_ret stk_smartbeat_add_name_service | ( | stk_smartbeat_ctrl_t * | smb, |
stk_name_service_t * | svc | ||
) |
Add a name service to smartbeat controller for heartbeating
smb | Smartbeat controller to be added to |
svc | Service to be added to the smartbeat controller |
stk_ret stk_smartbeat_add_service | ( | stk_smartbeat_ctrl_t * | smb, |
stk_service_t * | svc | ||
) |
Add service to smartbeat controller for heartbeating
smb | Smartbeat controller to be added to |
svc | Service to be added to the smartbeat controller |
stk_ret stk_smartbeat_remove_name_service | ( | stk_smartbeat_ctrl_t * | smb, |
stk_name_service_t * | svc | ||
) |
Remove a name service from a smartbeat controller
smb | Smartbeat controller to be updated |
svc | Service to be removed from the smartbeat controller |
stk_ret stk_smartbeat_remove_service | ( | stk_smartbeat_ctrl_t * | smb, |
stk_service_t * | svc | ||
) |
Remove service from a smartbeat controller
smb | Smartbeat controller to be updated |
svc | Service to be removed from the smartbeat controller |
stk_ret stk_smartbeat_update_current_time | ( | stk_smartbeat_t * | smb | ) |
Update the smartbeat with the current time
smb | Smartbeat controller to be updated |