feat: add service monitors support to prom #66

Merged
johnride merged 9 commits from monitoring_servicemonitor into master 2025-07-02 15:29:23 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit cbbe52fe9b - Show all commits

View File

@ -46,7 +46,7 @@ async fn main() {
);
let service_monitor_endpoint = ServiceMonitorEndpoint {
port: Some(80),
port: Some("80".to_string()),
target_port: None,
bearer_token_file: None,
interval: None,

View File

@ -96,11 +96,11 @@ pub struct ServiceMonitorTLSConfig {
pub struct ServiceMonitorEndpoint {
// ## Name of the endpoint's service port
// ## Mutually exclusive with targetPort
pub port: Option<u16>,
pub port: Option<String>,
// ## Name or number of the endpoint's target port
// ## Mutually exclusive with port

This should be a specific type that validates the path

This should be a specific type that validates the path
pub target_port: Option<u16>,
pub target_port: Option<String>,
// ## File containing bearer token to be used when scraping targets
// ##
taha marked this conversation as resolved Outdated

This should be an enum :

pub enum URLScheme {
 HTTP,
 HTTPS,
 // Maybe others such as :
 FILE,
 FTP,
 OTHER(String), // With this we are both usable with more frequent schemes and extensible 
}

impl Display for URLScheme {
 // TODO
}
 
This should be an enum : ```rust pub enum URLScheme { HTTP, HTTPS, // Maybe others such as : FILE, FTP, OTHER(String), // With this we are both usable with more frequent schemes and extensible } impl Display for URLScheme { // TODO }