syslog-ng source
stats-cluster-single.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Balabit
3  * Copyright (c) 2017 Laszlo Budai
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; 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 STATS_CLUSTER_SINGLE_H_INCLUDED
26 #define STATS_CLUSTER_SINGLE_H_INCLUDED
27 
28 #include "syslog-ng.h"
29 #include "stats-cluster.h"
30 
31 typedef enum
32 {
36 
37 void stats_cluster_single_key_set(StatsClusterKey *key, const gchar *name, StatsClusterLabel *labels, gsize labels_len);
38 
39 
40 /*
41  * The legacy functions should not be used for new code.
42  * When transforming a legacy stats key to a new metric key, aliases should be specified consistently at all call sites.
43  */
44 void stats_cluster_single_key_legacy_set(StatsClusterKey *key, guint16 component, const gchar *id,
45  const gchar *instance);
46 void stats_cluster_single_key_add_legacy_alias(StatsClusterKey *key, guint16 component, const gchar *id,
47  const gchar *instance);
48 void stats_cluster_single_key_legacy_set_with_name(StatsClusterKey *key, guint16 component, const gchar *id,
49  const gchar *instance, const gchar *name);
50 void stats_cluster_single_key_add_legacy_alias_with_name(StatsClusterKey *key, guint16 component, const gchar *id,
51  const gchar *instance, const gchar *name);
52 
53 void stats_cluster_single_key_add_unit(StatsClusterKey *key, StatsClusterUnit stored_unit);
55  StatsClusterFrameOfReference frame_of_reference);
56 
57 
59 
60 #endif
const gchar * name
Definition: debugger.c:265
void stats_cluster_single_key_add_unit(StatsClusterKey *key, StatsClusterUnit stored_unit)
Definition: stats-cluster-single.c:151
void stats_cluster_single_key_legacy_set_with_name(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance, const gchar *name)
Definition: stats-cluster-single.c:113
StatsCounterItem * stats_cluster_single_get_counter(StatsCluster *self)
Definition: stats-cluster-single.c:163
void stats_cluster_single_key_set(StatsClusterKey *key, const gchar *name, StatsClusterLabel *labels, gsize labels_len)
Definition: stats-cluster-single.c:142
void stats_cluster_single_key_legacy_set(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance)
Definition: stats-cluster-single.c:49
void stats_cluster_single_key_add_legacy_alias(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance)
Definition: stats-cluster-single.c:58
void stats_cluster_single_key_add_frame_of_reference(StatsClusterKey *key, StatsClusterFrameOfReference frame_of_reference)
Definition: stats-cluster-single.c:157
StatsCounterGroupSingle
Definition: stats-cluster-single.h:32
@ SC_TYPE_SINGLE_MAX
Definition: stats-cluster-single.h:34
@ SC_TYPE_SINGLE_VALUE
Definition: stats-cluster-single.h:33
void stats_cluster_single_key_add_legacy_alias_with_name(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance, const gchar *name)
Definition: stats-cluster-single.c:128
StatsClusterUnit
Definition: stats-cluster.h:50
StatsClusterFrameOfReference
Definition: stats-cluster.h:66
Definition: stats-cluster.h:155
Definition: stats-counter.h:67
struct tm key
Definition: cache.c:63