syslog-ng source
afmongodb-worker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2021 One Identity
3  * Copyright (c) 2010-2014 Gergely Nagy <algernon@balabit.hu>
4  * Copyright (c) 2021 László Várady
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published
8  * by the Free Software Foundation, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 
25 #ifndef AFMONGODB_WORKER_H_INCLUDED
26 #define AFMONGODB_WORKER_H_INCLUDED
27 
28 #include "syslog-ng.h"
29 #if SYSLOG_NG_HAVE_MONGOC_V2
30 # include "mongoc/mongoc.h"
31 #else
32 # include "mongoc.h"
33 #endif
35 
36 typedef struct MongoDBDestWorker
37 {
38  LogThreadedDestWorker super;
39 
40  mongoc_client_t *client;
41 
42  GString *collection;
43  mongoc_collection_t *coll_obj;
44  mongoc_bulk_operation_t *bulk_op;
45  mongoc_write_concern_t *write_concern;
46 
47  bson_t *bson;
48  bson_t *bson_opts;
50 
51 LogThreadedDestWorker *afmongodb_dw_new(LogThreadedDestDriver *owner, gint worker_index);
52 
53 #endif
LogThreadedDestWorker * afmongodb_dw_new(LogThreadedDestDriver *owner, gint worker_index)
Definition: afmongodb-worker.c:599
Definition: afmongodb-worker.h:37
bson_t * bson_opts
Definition: afmongodb-worker.h:48
mongoc_write_concern_t * write_concern
Definition: afmongodb-worker.h:45
LogThreadedDestWorker super
Definition: afmongodb-worker.h:38
mongoc_collection_t * coll_obj
Definition: afmongodb-worker.h:43
bson_t * bson
Definition: afmongodb-worker.h:47
mongoc_client_t * client
Definition: afmongodb-worker.h:40
mongoc_bulk_operation_t * bulk_op
Definition: afmongodb-worker.h:44
GString * collection
Definition: afmongodb-worker.h:42