syslog-ng source
http-worker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022 One Identity LLC.
3  * Copyright (c) 2018 Balazs Scheidler
4  * Copyright (c) 2016 Marc Falzon
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 HTTP_WORKER_H_INCLUDED
26 #define HTTP_WORKER_H_INCLUDED 1
27 
29 #include "http-loadbalancer.h"
30 #include "http-curl-header-list.h"
31 #include "compression.h"
33 
34 typedef struct _HTTPDestinationWorker
35 {
36  LogThreadedDestWorker super;
37  HTTPLoadBalancerClient lbc;
38  CURL *curl;
39  GString *request_body;
44  GString *url_buffer;
45  GString *response_buffer;
46  LogMessage *msg_for_templated_url;
47 
48  struct
49  {
50  DynMetricsStore *cache;
51  gchar requests_response_code_str_buffer[4];
52  } metrics;
54 
56  glong http_code);
57 LogThreadedDestWorker *http_dw_new(LogThreadedDestDriver *owner, gint worker_index);
58 
59 #endif
LogThreadedResult default_map_http_status_to_worker_status(HTTPDestinationWorker *self, const gchar *url, glong http_code)
Definition: http-worker.c:515
LogThreadedDestWorker * http_dw_new(LogThreadedDestDriver *owner, gint worker_index)
Definition: http-worker.c:1048
LogThreadedResult
Definition: logthrdestdrv.h:56
Definition: compression.c:36
Definition: http-worker.h:35
GString * request_body
Definition: http-worker.h:39
CURL * curl
Definition: http-worker.h:38
Compressor * compressor
Definition: http-worker.h:41
LogMessage * msg_for_templated_url
Definition: http-worker.h:46
LogThreadedDestWorker super
Definition: http-worker.h:36
GString * request_body_compressed
Definition: http-worker.h:40
GString * response_encoding
Definition: http-worker.h:43
List * request_headers
Definition: http-worker.h:42
GString * url_buffer
Definition: http-worker.h:44
DynMetricsStore * cache
Definition: http-worker.h:50
GString * response_buffer
Definition: http-worker.h:45
HTTPLoadBalancerClient lbc
Definition: http-worker.h:37