syslog-ng source
grpc-dest.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 Axoflow
3  * Copyright (c) 2023-2024 Attila Szakacs <attila.szakacs@axoflow.com>
4  * Copyright (c) 2023 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 GRPC_DEST_H
26 #define GRPC_DEST_H
27 
28 #include "syslog-ng.h"
29 
30 #include "compat/cpp-start.h"
31 
32 #include "driver.h"
34 
35 typedef enum
36 {
43 
44 typedef enum
45 {
64 
65 typedef struct GrpcDestDriver_ GrpcDestDriver;
66 
67 void grpc_dd_set_url(LogDriver *s, const gchar *url);
68 void grpc_dd_set_compression(LogDriver *s, gboolean enable);
69 void grpc_dd_set_batch_bytes(LogDriver *s, glong b);
70 void grpc_dd_set_keepalive_time(LogDriver *s, gint t);
71 void grpc_dd_set_keepalive_timeout(LogDriver *s, gint t);
72 void grpc_dd_set_keepalive_max_pings(LogDriver *s, gint p);
73 void grpc_dd_add_int_channel_arg(LogDriver *s, const gchar *name, glong value);
74 void grpc_dd_add_string_channel_arg(LogDriver *s, const gchar *name, const gchar *value);
75 gboolean grpc_dd_add_header(LogDriver *s, const gchar *name, LogTemplate *value);
76 gboolean grpc_dd_add_schema_field(LogDriver *d, const gchar *name, const gchar *type, LogTemplate *value);
77 void grpc_dd_set_protobuf_schema(LogDriver *d, const gchar *proto_path, GList *values);
79 
80 LogTemplateOptions *grpc_dd_get_template_options(LogDriver *d);
82 
83 #include "compat/cpp-end.h"
84 
85 #endif
const gchar * name
Definition: debugger.c:265
struct GrpcClientCredentialsBuilderW_ GrpcClientCredentialsBuilderW
Definition: grpc-credentials-builder.h:67
GrpcDestResponse
Definition: grpc-dest.h:45
@ GDR_OUT_OF_RANGE
Definition: grpc-dest.h:51
@ GDR_ABORTED
Definition: grpc-dest.h:50
@ GDR_NOT_FOUND
Definition: grpc-dest.h:55
@ GDR_OK
Definition: grpc-dest.h:46
@ GDR_DATA_LOSS
Definition: grpc-dest.h:52
@ GDR_INTERNAL
Definition: grpc-dest.h:61
@ GDR_INVALID_ARGUMENT
Definition: grpc-dest.h:54
@ GDR_ALREADY_EXISTS
Definition: grpc-dest.h:56
@ GDR_UNKNOWN
Definition: grpc-dest.h:53
@ GDR_FAILED_PRECONDITION
Definition: grpc-dest.h:59
@ GDR_RESOURCE_EXHAUSTED
Definition: grpc-dest.h:62
@ GDR_DEADLINE_EXCEEDED
Definition: grpc-dest.h:49
@ GDR_PERMISSION_DENIED
Definition: grpc-dest.h:57
@ GDR_CANCELLED
Definition: grpc-dest.h:48
@ GDR_UNAUTHENTICATED
Definition: grpc-dest.h:58
@ GDR_UNIMPLEMENTED
Definition: grpc-dest.h:60
@ GDR_UNAVAILABLE
Definition: grpc-dest.h:47
LogTemplateOptions * grpc_dd_get_template_options(LogDriver *d)
void grpc_dd_set_url(LogDriver *s, const gchar *url)
void grpc_dd_add_int_channel_arg(LogDriver *s, const gchar *name, glong value)
gboolean grpc_dd_add_schema_field(LogDriver *d, const gchar *name, const gchar *type, LogTemplate *value)
gboolean grpc_dd_add_header(LogDriver *s, const gchar *name, LogTemplate *value)
void grpc_dd_set_batch_bytes(LogDriver *s, glong b)
GrpcClientCredentialsBuilderW * grpc_dd_get_credentials_builder(LogDriver *s)
GrpcDestResponseAction
Definition: grpc-dest.h:36
@ GDRA_DISCONNECT
Definition: grpc-dest.h:38
@ GDRA_UNSET
Definition: grpc-dest.h:37
@ GDRA_RETRY
Definition: grpc-dest.h:40
@ GDRA_SUCCESS
Definition: grpc-dest.h:41
@ GDRA_DROP
Definition: grpc-dest.h:39
void grpc_dd_set_keepalive_timeout(LogDriver *s, gint t)
void grpc_dd_set_response_action(LogDriver *d, GrpcDestResponse response, GrpcDestResponseAction action)
void grpc_dd_add_string_channel_arg(LogDriver *s, const gchar *name, const gchar *value)
struct GrpcDestDriver_ GrpcDestDriver
Definition: grpc-dest.h:65
void grpc_dd_set_compression(LogDriver *s, gboolean enable)
void grpc_dd_set_keepalive_time(LogDriver *s, gint t)
void grpc_dd_set_protobuf_schema(LogDriver *d, const gchar *proto_path, GList *values)
void grpc_dd_set_keepalive_max_pings(LogDriver *s, gint p)
GString * value
Definition: test_decode.c:28