src/daemon/plugin_mock.c \
src/daemon/configfile.c \
src/daemon/configfile.h \
+ src/daemon/globals.c \
+ src/daemon/globals.h \
src/daemon/resource.c \
src/daemon/resource.h \
src/daemon/types_list.c \
src/daemon/types_list.h \
- src/daemon/utils_cache_mock.c \
+ src/daemon/utils_cache.c \
+ src/daemon/utils_cache.h \
src/daemon/utils_complain.c \
src/daemon/utils_complain.h \
src/daemon/utils_time.c \
src/utils/value_list/value_list.c \
src/utils/value_list/value_list.h
libplugin_mock_la_CPPFLAGS = $(AM_CPPFLAGS) -DMOCK_TIME
-libplugin_mock_la_LIBADD = libmetric.la liboconfig.la libcommon.la libignorelist.la $(COMMON_LIBS)
+libplugin_mock_la_LIBADD = libavltree.la libmetric.la liboconfig.la libcommon.la libignorelist.la $(COMMON_LIBS)
libformat_graphite_la_SOURCES = \
src/utils/format_graphite/format_graphite.c \
kstat_ctl_t *kc = NULL;
#endif /* HAVE_LIBKSTAT */
-char *hostname_g = "example.com";
-
void plugin_set_dir(const char *dir) { /* nop */
}
return ENOTSUP;
}
+int plugin_dispatch_missing(__attribute__((unused))
+ metric_family_t const *fam) {
+ return ENOTSUP;
+}
+
+void plugin_dispatch_cache_event(
+ __attribute__((unused)) enum cache_event_type_e event_type,
+ __attribute__((unused)) unsigned long callbacks_mask,
+ __attribute__((unused)) const char *name,
+ __attribute__((unused)) metric_t const *m) {
+ // no-op
+}
+
int plugin_dispatch_notification(__attribute__((unused))
const notification_t *notif) {
return ENOTSUP;
+++ /dev/null
-/**
- * collectd - src/tests/mock/utils_cache.c
- * Copyright (C) 2013 Florian octo Forster
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Florian octo Forster <octo at collectd.org>
- */
-
-#include "utils_cache.h"
-#include <errno.h>
-
-#include <errno.h>
-
-gauge_t *uc_get_rate_vl(__attribute__((unused)) data_set_t const *ds,
- __attribute__((unused)) value_list_t const *vl) {
- errno = ENOTSUP;
- return NULL;
-}
-
-int uc_get_rate(__attribute__((unused)) metric_t const *m,
- __attribute__((unused)) gauge_t *ret_value) {
- return ENOTSUP;
-}
-
-int uc_get_rate_by_name(const char *name, gauge_t *ret_value) {
- return ENOTSUP;
-}
-
-int uc_get_names(char ***ret_names, cdtime_t **ret_times, size_t *ret_number) {
- return ENOTSUP;
-}
-
-int uc_get_value_by_name_vl(const char *name, value_t **ret_values,
- size_t *ret_values_num) {
- return ENOTSUP;
-}
-
-int uc_meta_data_get_signed_int(metric_t const *m, const char *key,
- int64_t *value) {
- return -ENOENT;
-}
-
-int uc_meta_data_get_unsigned_int(metric_t const *m, const char *key,
- uint64_t *value) {
- return -ENOENT;
-}
-
-int uc_meta_data_add_signed_int(metric_t const *m, const char *key,
- int64_t value) {
- return 0;
-}
-
-int uc_meta_data_add_unsigned_int(metric_t const *m, const char *key,
- uint64_t value) {
- return 0;
-}