-
Notifications
You must be signed in to change notification settings - Fork 33
/
agent.h
56 lines (47 loc) · 2.57 KB
/
agent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef AGENT_H
#define AGENT_H
#include <libconflate/conflate.h>
#ifdef REDIRECTS_FOR_MOCKS
#include "redirects.h"
#endif
int cproxy_init_agent(char *cfg_str,
proxy_behavior behavior,
int nthreads);
proxy_main *cproxy_init_agent_start(char *jid, char *jpw,
char *config, char *host,
proxy_behavior behavior,
int nthreads);
void on_conflate_new_config(void *userdata, kvpair_t *config);
enum conflate_mgmt_cb_result on_conflate_get_stats(void *opaque,
conflate_handle_t *handle,
const char *cmd,
bool direct,
kvpair_t *form,
conflate_form_result *);
enum conflate_mgmt_cb_result on_conflate_reset_stats(void *opaque,
conflate_handle_t *handle,
const char *cmd,
bool direct,
kvpair_t *form,
conflate_form_result *);
enum conflate_mgmt_cb_result on_conflate_ping_test(void *opaque,
conflate_handle_t *handle,
const char *cmd,
bool direct,
kvpair_t *form,
conflate_form_result *);
void cproxy_on_config_pool(proxy_main *m,
char *name, int port,
char *config_str,
uint32_t config_ver,
proxy_behavior_pool *behavior_pool);
char **get_key_values(kvpair_t *kvs, char *key);
void proxy_stats_dump_basic(ADD_STAT add_stats, conn *c,
const char *prefix);
void proxy_stats_dump_proxy_main(ADD_STAT add_stats, conn *c,
struct proxy_stats_cmd_info *pscip);
void proxy_stats_dump_proxies(ADD_STAT add_stats, conn *c,
struct proxy_stats_cmd_info *pscip);
void proxy_stats_dump_timings(ADD_STAT add_stats, conn *c);
#endif /* AGENT_H */