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