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_group_api.h
Go to the documentation of this file.
1
6
#ifndef STK_SERVICE_GROUP_API_H
7
#define STK_SERVICE_GROUP_API_H
8
#include "
stk_service_group.h
"
9
#include "
stk_service.h
"
10
#include "
stk_env.h
"
11
#include <sys/types.h>
12
#include <sys/socket.h>
13
#include <arpa/inet.h>
14
#include <netinet/in.h>
15
#include <netinet/tcp.h>
16
17
/* The service group APIs provide a means to register services as groups.
18
* It is possible for a service to be registered in multiple groups simultaneously
19
*/
20
28
stk_service_group_t
*
stk_create_service_group
(
stk_env_t
*env,
char
*name,
stk_service_group_id
id
,
stk_options_t
*options);
33
stk_ret
stk_destroy_service_group
(
stk_service_group_t
*svcgrp);
34
39
stk_ret
stk_set_service_group_state
(
stk_service_group_t
*svc_group,
stk_service_t
*svc,
stk_service_group_state
state);
44
stk_service_group_state
stk_get_service_group_state
(
stk_service_group_t
*svc_group,
stk_service_t
*svc);
45
50
stk_ret
stk_add_service_to_group
(
stk_service_group_t
*svc_group,
stk_service_t
*svc,
struct
sockaddr_in ip,
stk_service_in_group_state
state);
55
stk_ret
stk_remove_service_from_group
(
stk_service_group_t
*svc_group,
stk_service_t
*svc);
56
61
stk_ret
stk_set_service_state_in_group
(
stk_service_group_t
*svc_group,
stk_service_t
*svc,
stk_service_in_group_state
state);
66
stk_service_in_group_state
stk_get_service_state_in_group
(
stk_service_group_t
*svc_group,
stk_service_t
*svc);
67
72
stk_service_t
*
stk_find_service_in_group_by_name
(
stk_service_group_t
*svc_group,
char
*name,
struct
sockaddr_in ip);
73
78
stk_service_t
*
stk_find_service_in_group_by_id
(
stk_service_group_t
*svc_group,
stk_service_id
id
,
struct
sockaddr_in ip);
79
85
stk_ret
stk_iterate_service_group
(
stk_service_group_t
*svc_group,
stk_service_in_group_cb
cb,
void
*clientd);
86
91
stk_env_t
*
stk_get_service_group_env
(
stk_service_group_t
*svcgrp);
92
97
char
*
stk_get_service_group_name
(
stk_service_group_t
*svcgrp);
98
103
stk_options_t
*
stk_get_service_group_options
(
stk_service_group_t
*svcgrp);
104
109
stk_ret
stk_service_group_handle_smartbeat
(
stk_service_group_t
*svc_group,
stk_service_id
svc_id,
stk_smartbeat_t
*smartbeat,
struct
sockaddr_in reporting_ip);
110
115
stk_service_group_id
stk_get_service_group_id
(
stk_service_group_t
*svcgrp);
116
#endif
Sequence Toolkit
API, Wed Apr 15 2015 22:32:53