The Sequence Toolkit
www.sequence-toolkit.com
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
include
stk_service_api.h
Go to the documentation of this file.
1
5
#ifndef STK_SERVICE_API_H
6
#define STK_SERVICE_API_H
7
8
#include "
stk_env.h
"
9
#include "
stk_service.h
"
10
#include "
stk_sequence.h
"
11
#include "
stk_data_flow.h
"
12
#include "
stk_common.h
"
13
18
stk_service_t
*
stk_create_service
(
stk_env_t
*env,
char
*name,
stk_service_id
id
,
stk_service_type
type,
stk_options_t
*options);
19
26
stk_ret
stk_destroy_service
(
stk_service_t
*svc,
stk_service_state
*last_state);
27
28
/* APIs to manage service state */
33
stk_ret
stk_set_service_state
(
stk_service_t
*svc,
stk_service_state
state);
38
stk_service_state
stk_get_service_state
(
stk_service_t
*svc);
43
stk_uint32
stk_get_service_activity_tmo
(
stk_service_t
*svc);
44
45
/* APIs to add or remove metadata from a service */
46
#if 0
47
52
stk_ret
stk_service_add_metadata(
stk_service_t
*svc,
stk_sequence_t
*metadata);
58
stk_ret
stk_service_del_metadata(
stk_service_t
*svc,
stk_sequence_t
*metadata);
59
#endif
60
64
char
*
stk_get_service_name
(
stk_service_t
*svc);
69
stk_service_id
stk_get_service_id
(
stk_service_t
*svc);
74
stk_service_type
stk_get_service_type
(
stk_service_t
*svc);
75
76
/* Heartbeat and application liveness APIs */
77
#include "
stk_smartbeat.h
"
78
79
#if 0
80
84
stk_ret
stk_service_bump_smartbeat_checkpoint(
stk_service_t
*svc);
85
90
stk_ret
stk_service_last_smartbeat(
stk_service_t
*svc,
stk_smartbeat_t
*smartbeat);
91
95
stk_ret
stk_service_update_smartbeat_time(
stk_service_t
*svc,
struct
timeval *smartbeat);
96
97
#endif
98
104
void
stk_service_update_smartbeat
(
stk_service_t
*svc,
stk_smartbeat_t
*smartbeat);
105
109
void
stk_service_update_smartbeat_checkpoint
(
stk_service_t
*svc,
stk_checkpoint_t
checkpoint);
110
116
stk_data_flow_t
**
stk_svc_get_smartbeat_flows
(
stk_service_t
*svc);
120
void
stk_get_service_smartbeat
(
stk_service_t
*svc,
stk_smartbeat_t
*smb);
124
stk_data_flow_t
*
stk_get_monitoring_df
(
stk_service_t
*svc);
128
stk_data_flow_t
*
stk_get_notification_df
(
stk_service_t
*svc);
132
stk_env_t
*
stk_env_from_service
(
stk_service_t
*svc);
138
void
stk_get_service_state_str
(
stk_service_t
*svc,
stk_service_state
state,
char
*state_str,
size_t
size);
145
void
stk_set_service_state_str
(
stk_service_t
*svc,
stk_service_state
state,
char
*state_str,
size_t
size);
146
151
stk_options_t
*
stk_get_service_options
(
stk_service_t
*svc);
152
#endif
Sequence Toolkit
API, Wed Apr 15 2015 22:32:53