diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2022-01-13 18:07:59 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2022-01-13 18:07:59 +0300 |
commit | 4c6b49955db4ac5519b5c2b04ee7202e13287f28 (patch) | |
tree | 908cd75f28d83345cc65ca6bc9c3909d62a0eaf5 /include/zbxrtc.h | |
parent | 9138ba74b5692ee468955b2622485dc8cb3ec4c3 (diff) |
.......PS. [ZBXNEXT-7411] replaced signals with IPC messages for most of internal RTC implementation
Diffstat (limited to 'include/zbxrtc.h')
-rw-r--r-- | include/zbxrtc.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/include/zbxrtc.h b/include/zbxrtc.h index d310c1fb2d7..b4b577bed52 100644 --- a/include/zbxrtc.h +++ b/include/zbxrtc.h @@ -24,18 +24,44 @@ typedef struct { + zbx_ipc_client_t *client; + unsigned char process_type; + int process_num; +} +zbx_rtc_sub_t; + +ZBX_PTR_VECTOR_DECL(rtc_sub, zbx_rtc_sub_t *) + +typedef struct +{ + zbx_ipc_client_t *client; + zbx_uint32_t code; +} +zbx_rtc_hook_t; + +ZBX_PTR_VECTOR_DECL(rtc_hook, zbx_rtc_hook_t *); + +typedef struct +{ zbx_ipc_service_t service; + zbx_vector_rtc_sub_t subs; + zbx_vector_rtc_hook_t hooks; } zbx_rtc_t; /* provider API */ int zbx_rtc_init(zbx_rtc_t *rtc ,char **error); -void zbx_rtc_dispatch(zbx_ipc_client_t *client, zbx_ipc_message_t *message); +void zbx_rtc_dispatch(zbx_rtc_t *rtc, zbx_ipc_client_t *client, zbx_ipc_message_t *message); void zbx_rtc_wait_config_sync(zbx_rtc_t *rtc); +void zbx_rtc_shutdown_subs(zbx_rtc_t *rtc); /* client API */ int zbx_rtc_process(const char *option, char **error); int zbx_rtc_open(zbx_ipc_async_socket_t *asocket, int timeout, char **error); -int zbx_rtc_notify_config_sync(char **error); +void zbx_rtc_notify_config_sync(zbx_ipc_async_socket_t *rtc); + +void zbx_rtc_subscribe(zbx_ipc_async_socket_t *rtc); +int zbx_rtc_wait(zbx_ipc_async_socket_t *rtc, zbx_uint32_t *cmd, unsigned char **data, int timeout); +int zbx_rtc_reload_config_cache(char **error); #endif |