root/src/stratcon_jlog_streamer.h

Revision 21b0c6c1011f78327925b8a1914d98cdd5cd43d5, 1.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

first whack at feeding actual data. refs #71

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2007, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  */
5
6 #ifndef _STRATCON_LOG_STREAMER_H
7 #define _STRATCON_LOG_STREAMER_H
8
9 #include "noit_conf.h"
10 #include <netinet/in.h>
11 #include <sys/un.h>
12 #include <arpa/inet.h>
13
14 typedef struct noit_connection_ctx_t {
15   union {
16     struct sockaddr remote;
17     struct sockaddr_un remote_un;
18     struct sockaddr_in remote_in;
19     struct sockaddr_in6 remote_in6;
20   } r;
21   socklen_t remote_len;
22   char *remote_cn;
23   u_int32_t current_backoff;
24   int wants_shutdown;
25   noit_hash_table *config;
26   noit_hash_table *sslconfig;
27   eventer_t timeout_event;
28
29   eventer_func_t consumer_callback;
30   void (*consumer_free)(void *);
31   void *consumer_ctx;
32 } noit_connection_ctx_t;
33
34 API_EXPORT(void)
35   stratcon_jlog_streamer_init(const char *toplevel);
36 API_EXPORT(void)
37   stratcon_jlog_streamer_reload(const char *toplevel);
38 API_EXPORT(void)
39   stratcon_streamer_connection(const char *toplevel, const char *destination,
40                                eventer_func_t handler,
41                                void *(*handler_alloc)(void), void *handler_ctx,
42                                void (*handler_free)(void *));
43
44 #endif
Note: See TracBrowser for help on using the browser.