#include "xroad_node_fwd.h"
#include "xroad_node_types.h"
#include <common/xroad_common_types.h>
#include <common/xroad_string.h>
#include <common/xroad_string_decl.h>
#include <stdint.h>
#include <stdbool.h>
#include <signal.h>
Go to the source code of this file.
|
#define | __xroad_system_cursor_dtor__ __dtor__(xroad_system_cursor_destructor) |
|
|
typedef struct xroad_system_cursor_s | xroad_system_cursor_t |
|
|
enum | xroad_node_status_t {
xroad_node_status_active = 1
, xroad_node_status_offline = 2
, xroad_node_status_dead = 3
, xroad_node_status_inactive = 4
,
xroad_node_status_sleep = 5
, xroad_node_status_deleted = 6
} |
|
enum | xroad_node_flag_t {
xroad_node_flag_stand_alone = 1
, xroad_node_flag_hidden = 2
, xroad_node_flag_memory_locked = 4
, xroad_node_flag_sleep_primary = 8
,
xroad_node_flag_sleep_backup = 16
, xroad_node_flag_alarm_disabled = 32
, xroad_node_flag_allow_clone = 64
} |
|
enum | xroad_link_type_t { xroad_link_type_posix_queue = 1
, xroad_link_type_shm_queue = 2
} |
|
enum | xroad_system_role_t { xroad_system_role_primary = 1
, xroad_system_role_backup = 2
} |
|
◆ xroad_link_type_t
◆ xroad_node_flag_t
node flags
Enumerator |
---|
xroad_node_flag_stand_alone | node is a standalone, i.e. not controlled by init process
|
xroad_node_flag_hidden | node is hidden, i.e. not shown by view or WebUI
|
xroad_node_flag_memory_locked | node is locked in memory
|
xroad_node_flag_sleep_primary | node is sleeping on primary system
|
xroad_node_flag_sleep_backup | node is sleeping on backup system
|
xroad_node_flag_alarm_disabled | node alarms enabled/disabled
|
xroad_node_flag_allow_clone | node allowd to clone/delete/rename
|
◆ xroad_node_status_t
node status
Enumerator |
---|
xroad_node_status_active | node is active and works
|
xroad_node_status_offline | node started, but is not active
|
xroad_node_status_dead | node is DEAD, process stopped
|
xroad_node_status_inactive | node is working, but inactive
|
xroad_node_status_sleep | node is sleeping
|
xroad_node_status_deleted | node was deleted
|
◆ xroad_system_role_t
◆ xroad_node_status_to_str()
status to string
- Parameters
-
[in] | status | - status to convert |
- Returns
- string
◆ xroad_system_create_cursor()
xroad_system_cursor_t* xroad_system_create_cursor |
( |
| ) |
|
create new cursor for node data traversal return new cursor
◆ xroad_system_cursor_get_first()
get first node data
- Parameters
-
[in] | cursor | - node data cursor |
- Returns
- first node data
◆ xroad_system_cursor_get_last()
get last node data
- Parameters
-
[in] | cursor | - node data cursor |
- Returns
- last node data
◆ xroad_system_cursor_get_next()
get next node data
- Parameters
-
[in] | cursor | - node data cursor |
- Returns
- next node data
◆ xroad_system_cursor_get_prev()
get previous node data
- Parameters
-
[in] | cursor | - node data cursor |
- Returns
- previous node data
◆ xroad_system_destroy_cursor()
void xroad_system_destroy_cursor |
( |
xroad_system_cursor_t * |
cursor | ) |
|
destroy cursor
- Parameters
-
[in] | cursor | - cursor to destroy |
◆ xroad_system_get()
return pointer to created system
- Returns
- pointer to system
◆ xroad_system_get_by_id()
find node by id
- Parameters
-
- Returns
- pointer to node data in system, NULL - no such node
◆ xroad_system_get_by_name()
find node by name
- Parameters
-
[in] | name | - name of node to find |
- Returns
- pointer to node data in system, NULL - no such node
◆ xroad_system_get_by_pid()
find node by pid
- Parameters
-
- Returns
- pointer to node data in system, NULL - no such node
◆ xroad_system_get_variables()
get environment variables
- Parameters
-
- Returns
- hash table with varibles
◆ xroad_system_init()
xroad_errno_t xroad_system_init |
( |
bool |
out_of_system | ) |
|
init system
- Parameters
-
[in] | out_of_system | - true - process is not a part of system. it only has an access to cache |
- Returns
- XROAD_OK - system has been initialized
◆ xroad_system_read_config()
read config file of node
- Parameters
-
- Returns
- node config document
◆ xroad_system_role_to_str()
role to string
- Parameters
-
[in] | role | - role to convert |
- Returns
- string