From 0b74a25a2fda7e77f20519642a2fc101fd46980b Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 18 May 2015 22:50:19 +0200 Subject: [PATCH] Remove (now) usued sdb_fe_exec_timeseries(). --- src/frontend/query.c | 33 ------------------------------- src/include/frontend/connection.h | 15 -------------- 2 files changed, 48 deletions(-) diff --git a/src/frontend/query.c b/src/frontend/query.c index 703853c..6015d7d 100644 --- a/src/frontend/query.c +++ b/src/frontend/query.c @@ -463,38 +463,5 @@ sdb_fe_exec_lookup(sdb_conn_t *conn, int type, return 0; } /* sdb_fe_exec_lookup */ -int -sdb_fe_exec_timeseries(sdb_conn_t *conn, - const char *hostname, const char *metric, - sdb_timeseries_opts_t *opts) -{ - sdb_strbuf_t *buf; - uint32_t res_type = htonl(SDB_CONNECTION_TIMESERIES); - - buf = sdb_strbuf_create(1024); - if (! buf) { - char errbuf[1024]; - sdb_log(SDB_LOG_ERR, "frontend: Failed to create " - "buffer to handle TIMESERIES command: %s", - sdb_strerror(errno, errbuf, sizeof(errbuf))); - - sdb_strbuf_sprintf(conn->errbuf, "Out of memory"); - return -1; - } - - sdb_strbuf_memcpy(buf, &res_type, sizeof(uint32_t)); - if (sdb_store_fetch_timeseries(hostname, metric, opts, buf)) { - sdb_log(SDB_LOG_ERR, "frontend: Failed to fetch time-series"); - sdb_strbuf_sprintf(conn->errbuf, "Failed to fetch time-series"); - sdb_strbuf_destroy(buf); - return -1; - } - - sdb_connection_send(conn, SDB_CONNECTION_DATA, - (uint32_t)sdb_strbuf_len(buf), sdb_strbuf_string(buf)); - sdb_strbuf_destroy(buf); - return 0; -} /* sdb_fe_exec_timeseries */ - /* vim: set tw=78 sw=4 ts=4 noexpandtab : */ diff --git a/src/include/frontend/connection.h b/src/include/frontend/connection.h index 98c4136..f72f5e2 100644 --- a/src/include/frontend/connection.h +++ b/src/include/frontend/connection.h @@ -242,21 +242,6 @@ int sdb_fe_exec_lookup(sdb_conn_t *conn, int type, sdb_store_matcher_t *m, sdb_store_matcher_t *filter); -/* - * sdb_fe_exec_timeseries: - * Execute the 'TIMESERIES' command. Send the time-series for the specified - * host's metric, serialized as JSON, to the client. See - * sdb_store_fetch_timeseries for details. - * - * Returns: - * - 0 on success - * - a negative value else - */ -int -sdb_fe_exec_timeseries(sdb_conn_t *conn, - const char *hostname, const char *metric, - sdb_timeseries_opts_t *opts); - /* * sdb_fe_store_host, sdb_fe_store_service, sdb_fe_store_metric, * sdb_fe_store_attribute: -- 2.30.2