feat: add service monitors support to prom #66
| @ -46,7 +46,7 @@ async fn main() { | |||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     let service_monitor_endpoint = ServiceMonitorEndpoint { |     let service_monitor_endpoint = ServiceMonitorEndpoint { | ||||||
|         port: Some(80), |         port: Some("80".to_string()), | ||||||
|         target_port: None, |         target_port: None, | ||||||
|         bearer_token_file: None, |         bearer_token_file: None, | ||||||
|         interval: None, |         interval: None, | ||||||
|  | |||||||
| @ -96,11 +96,11 @@ pub struct ServiceMonitorTLSConfig { | |||||||
| pub struct ServiceMonitorEndpoint { | pub struct ServiceMonitorEndpoint { | ||||||
|     // ## Name of the endpoint's service port
 |     // ## Name of the endpoint's service port
 | ||||||
|     // ## Mutually exclusive with targetPort
 |     // ## Mutually exclusive with targetPort
 | ||||||
|     pub port: Option<u16>, |     pub port: Option<String>, | ||||||
| 
 | 
 | ||||||
|     // ## Name or number of the endpoint's target port
 |     // ## Name or number of the endpoint's target port
 | ||||||
|     // ## Mutually exclusive with port
 |     // ## Mutually exclusive with port
 | ||||||
|  | |||||||
|     pub target_port: Option<u16>, |     pub target_port: Option<String>, | ||||||
| 
 | 
 | ||||||
|     // ## File containing bearer token to be used when scraping targets
 |     // ## File containing bearer token to be used when scraping targets
 | ||||||
|     // ##
 |     // ##
 | ||||||
| 
					
					taha marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						johnride
						commented  This should be an enum : 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
}
  | |||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
This should be a specific type that validates the path