Skip to content

Commit

Permalink
lib: cmetrics: upgrade to v0.9.0
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 27, 2024
1 parent dd1bcbb commit 5687b89
Show file tree
Hide file tree
Showing 11 changed files with 1,557 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/cmetrics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# CMetrics Version
set(CMT_VERSION_MAJOR 0)
set(CMT_VERSION_MINOR 8)
set(CMT_VERSION_MINOR 9)
set(CMT_VERSION_PATCH 0)
set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}")

Expand Down
39 changes: 39 additions & 0 deletions lib/cmetrics/include/cmetrics/cmt_decode_prometheus_remote_write.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/* CMetrics
* ========
* Copyright 2021-2024 The CMetrics Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


#ifndef CMT_DECODE_PROMETHEUS_REMOTE_WRITE_H
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_H

#include <cmetrics/cmetrics.h>
#include <prometheus_remote_write/remote.pb-c.h>

#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_SUCCESS 0
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_ALLOCATION_ERROR 1
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNEXPECTED_ERROR 2
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_INVALID_ARGUMENT_ERROR 3
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNEXPECTED_METRIC_TYPE 4
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_DECODE_ERROR 5
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNPACK_ERROR 6
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNSUPPORTED_METRIC_TYPE 7

int cmt_decode_prometheus_remote_write_create(struct cmt **out_cmt, char *in_buf, size_t in_size);
void cmt_decode_prometheus_remote_write_destroy(struct cmt *cmt);

#endif
6 changes: 4 additions & 2 deletions lib/cmetrics/include/prometheus_remote_write/remote.pb-c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

261 changes: 258 additions & 3 deletions lib/cmetrics/include/prometheus_remote_write/types.pb-c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5687b89

Please sign in to comment.