File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ async fn run_onboard_service(kms_config: KmsConfig, figment: Figment) -> Result<
6363 // Remove section tls
6464
6565 let rocket = rocket:: custom ( figment)
66- . mount ( "/" , rocket:: routes![ index, finish] )
66+ . mount ( "/" , rocket:: routes![ index, finish, health ] )
6767 . mount (
6868 "/prpc" ,
6969 ra_rpc:: prpc_routes!( OnboardState , OnboardHandler , trim: "Onboard." ) ,
@@ -80,6 +80,11 @@ async fn run_onboard_service(kms_config: KmsConfig, figment: Figment) -> Result<
8080 Ok ( ( ) )
8181}
8282
83+ #[ rocket:: get( "/health" ) ]
84+ fn health ( ) -> RawText < & ' static str > {
85+ RawText ( "OK" )
86+ }
87+
8388#[ rocket:: get( "/metrics" ) ]
8489fn metrics ( state : & State < KmsState > ) -> RawText < String > {
8590 RawText ( state. metrics ( ) . render_prometheus ( ) )
@@ -184,6 +189,7 @@ async fn main() -> Result<()> {
184189 "/prpc" ,
185190 ra_rpc:: prpc_routes!( KmsState , RpcHandler , trim: "KMS." ) ,
186191 )
192+ . mount ( "/" , rocket:: routes![ health] )
187193 . manage ( state. clone ( ) ) ;
188194
189195 if metrics_enabled {
You can’t perform that action at this time.
0 commit comments