This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tsg-service-chaining-…/platform/src/health_check.cpp

65 lines
1.1 KiB
C++
Raw Normal View History

#include <string.h>
#include "health_check.h"
struct session_table
{
// rwlock ???;
// handler;
};
static struct session_table g_handle;
struct session_iterm
{
int session_id; // key
struct health_check policy; // value1: deep copy
int is_active; // value2
};
void health_check_session_init()
{
memset(&g_handle, 0, sizeof(g_handle));
// TODO
}
// return 0 : success
// return -1 : key exist
// struct health_check *policy : need deep copy
int health_check_session_add(int session_id, const struct health_check *policy)
{
// TODO
return 0;
}
// return 0 : success
// return -1 : key not exist
int health_check_session_del(int session_id)
{
// TODO
return 0;
}
// return 1 : active
// return 0 : inactive
// return -1 : key not exist
int health_check_session_get_status(int session_id)
{
// TODO
return 1;
}
// return 0 : success
// return -1 : key not exist
int health_check_session_set_status(int session_id, int is_active)
{
// TODO
return 0;
}
void health_check_session_foreach()
{
// TODO
}