libprom  @VERSION@
C based libraries to expose metrics in Promtheus exposition format
promhttp.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  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16  */
17 
27 #include <string.h>
28 
29 #include "microhttpd.h"
31 
40 
49 struct MHD_Daemon *promhttp_start_daemon(unsigned int flags, unsigned short port, MHD_AcceptPolicyCallback apc, void *apc_cls);
50 
59 void promhttp_stop_daemon(struct MHD_Daemon *daemon);
promhttp_stop_daemon
void promhttp_stop_daemon(struct MHD_Daemon *daemon)
Shutdown the given HTTP daemon.
promhttp_start_daemon
struct MHD_Daemon * promhttp_start_daemon(unsigned int flags, unsigned short port, MHD_AcceptPolicyCallback apc, void *apc_cls)
Start a daemon in the background and return a reference to it.
pcr_t
struct pcr pcr_t
A prom_registry_t is responsible for registering metrics and briding them to the string exposition fo...
Definition: prom_collector_registry.h:83
promhttp_set_active_collector_registry
void promhttp_set_active_collector_registry(pcr_t *registry)
Sets the active registry for metric scraping.
prom_collector_registry.h
The collector registry registers collectors for metric exposition.