libprom  @VERSION@
C based libraries to expose metrics in Promtheus exposition format
prom/include/prom_string_builder.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2019-2020 DigitalOcean Inc.
00003  * Copyright 2021 Jens Elkner <jel+libprom@cs.uni-magdeburg.de>
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00028 #ifndef PROM_STRING_BUILDER_I_H
00029 #define PROM_STRING_BUILDER_I_H
00030 
00031 #include <stddef.h>
00032 
00034 struct psb;
00035 typedef struct psb psb_t;
00036 
00041 psb_t *psb_new(void);
00042 
00048 int psb_destroy(psb_t *self);
00049 
00057 int psb_add_str(psb_t *self, const char *str);
00058 
00066 int psb_add_char(psb_t *self, char c);
00067 
00074 int psb_clear(psb_t *self);
00075 
00084 int psb_truncate(psb_t *self, size_t len);
00085 
00091 size_t psb_len(psb_t *self);
00092 
00099 char *psb_dump(psb_t *self);
00100 
00108 char *psb_str(psb_t *self);
00109 
00110 #endif  // PROM_STRING_BUILDER_I_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines