libprom  1.2.0
C based libraries to expose metrics in Promtheus exposition format
prom_metric_sample.h
Go to the documentation of this file.
1 /*
2 Copyright 2019-2020 DigitalOcean Inc.
3 Copyright 2021 Jens Elkner <jel+libprom@cs.uni-magdeburg.de>
4 
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 */
18 
24 #ifndef PROM_METRIC_SAMPLE_H
25 #define PROM_METRIC_SAMPLE_H
26 
27 struct pms;
33 typedef struct pms pms_t;
34 
41 int pms_add(pms_t *self, double r_value);
42 
49 int pms_sub(pms_t *self, double r_value);
50 
57 int pms_set(pms_t *self, double r_value);
58 
59 #endif // PROM_METRIC_SAMPLE_H
pms_set
int pms_set(pms_t *self, double r_value)
Set the given r_value to the given ample.
pms_t
struct pms pms_t
Contains the specific metric and value given the name and label set.
Definition: prom_metric_sample.h:33
pms_sub
int pms_sub(pms_t *self, double r_value)
Subtract the given r_value from the given sample.
pms_add
int pms_add(pms_t *self, double r_value)
Add the given r_value to the given sample.