hs-test: remove untagged images after build
[vpp.git] / src / plugins / prom / prom.h
1 /*
2  * Copyright (c) 2022 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #ifndef SRC_PLUGINS_PROM_PROM_H_
17 #define SRC_PLUGINS_PROM_PROM_H_
18
19 #include <vnet/session/session.h>
20 #include <http_static/http_static.h>
21
22 typedef struct prom_main_
23 {
24   u8 *stats;
25   f64 last_scrape;
26   hss_register_url_fn register_url;
27   hss_session_send_fn send_data;
28   u32 scraper_node_index;
29   u8 is_enabled;
30   u8 *name_scratch_pad;
31   vlib_main_t *vm;
32
33   /*
34    * Configs
35    */
36   u8 **stats_patterns;
37   u8 *stat_name_prefix;
38   f64 min_scrape_interval;
39   u8 used_only;
40 } prom_main_t;
41
42 typedef enum prom_process_evt_codes_
43 {
44   PROM_SCRAPER_EVT_RUN,
45 } prom_process_evt_codes_t;
46
47 void prom_enable (vlib_main_t *vm);
48 prom_main_t *prom_get_main (void);
49
50 void prom_stat_patterns_set (u8 **patterns);
51 void prom_stat_patterns_add (u8 **patterns);
52 u8 **prom_stat_patterns_get (void);
53 void prom_stat_patterns_free (void);
54
55 void prom_stat_name_prefix_set (u8 *prefix);
56 void prom_report_used_only (u8 used_only);
57
58 #endif /* SRC_PLUGINS_PROM_PROM_H_ */
59
60 /*
61  * fd.io coding-style-patch-verification: ON
62  *
63  * Local Variables:
64  * eval: (c-set-style "gnu")
65  * End:
66  */