syslog-ng source
redis.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Balabit
3  * Copyright (c) 2013 Tihamer Petrovics <tihameri@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef REDIS_H_INCLUDED
25 #define REDIS_H_INCLUDED
26 
27 #include "driver.h"
29 
30 
31 typedef struct _RedisDriver
32 {
33  LogThreadedDestDriver super;
34 
35  gchar *host;
36  gint port;
37  gchar *auth;
38  struct timeval timeout;
39 
40  LogTemplateOptions template_options;
41 
42  GString *command;
43  GList *arguments;
44 } RedisDriver;
45 
46 
47 LogDriver *redis_dd_new(GlobalConfig *cfg);
48 
49 void redis_dd_set_timeout(LogDriver *d, const glong timeout);
50 void redis_dd_set_host(LogDriver *d, const gchar *host);
51 void redis_dd_set_port(LogDriver *d, gint port);
52 void redis_dd_set_auth(LogDriver *d, const gchar *auth);
53 void redis_dd_set_command_ref(LogDriver *d, const gchar *command,
54  GList *arguments);
55 LogTemplateOptions *redis_dd_get_template_options(LogDriver *d);
56 
57 #endif
DebuggerCommandFunc command
Definition: debugger.c:266
void redis_dd_set_port(LogDriver *d, gint port)
Definition: redis.c:56
void redis_dd_set_timeout(LogDriver *d, const glong timeout)
Definition: redis.c:73
void redis_dd_set_auth(LogDriver *d, const gchar *auth)
Definition: redis.c:64
void redis_dd_set_command_ref(LogDriver *d, const gchar *command, GList *arguments)
Definition: redis.c:88
LogTemplateOptions * redis_dd_get_template_options(LogDriver *d)
Definition: redis.c:99
LogDriver * redis_dd_new(GlobalConfig *cfg)
Definition: redis.c:192
void redis_dd_set_host(LogDriver *d, const gchar *host)
Definition: redis.c:47
Definition: redis.h:32
gint port
Definition: redis.h:36
gchar * auth
Definition: redis.h:37
LogTemplateOptions template_options
Definition: redis.h:40
GList * arguments
Definition: redis.h:43
LogThreadedDestDriver super
Definition: redis.h:33
GString * command
Definition: redis.h:42
gchar * host
Definition: redis.h:35
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34