@@ -45,6 +45,7 @@ use stackable_operator::{
4545 } ,
4646 role_utils:: { JavaCommonConfig , RoleGroupConfig , with_validated_config} ,
4747 types:: {
48+ common:: Port ,
4849 kubernetes:: { ConfigMapName , ListenerClassName } ,
4950 operator:: { RoleGroupName , RoleName } ,
5051 } ,
@@ -91,7 +92,7 @@ pub const PROP_SEGMENT_CACHE_LOCATIONS: &str = "druid.segmentCache.locations";
9192// CONFIG PROPERTIES //
9293/////////////////////////////
9394pub const METRICS_PORT_NAME : & str = "metrics" ;
94- pub const METRICS_PORT : u16 = 9090 ;
95+ pub const METRICS_PORT : Port = Port ( 9090 ) ;
9596
9697pub const COOKIE_PASSPHRASE_ENV : & str = "OIDC_COOKIE_PASSPHRASE" ;
9798
@@ -724,24 +725,24 @@ impl DruidRole {
724725 }
725726
726727 /// Returns the http port for every role
727- pub fn get_http_port ( & self ) -> u16 {
728+ pub fn get_http_port ( & self ) -> Port {
728729 match & self {
729- DruidRole :: Coordinator => 8081 ,
730- DruidRole :: Broker => 8082 ,
731- DruidRole :: Historical => 8083 ,
732- DruidRole :: MiddleManager => 8091 ,
733- DruidRole :: Router => 8888 ,
730+ DruidRole :: Coordinator => Port ( 8081 ) ,
731+ DruidRole :: Broker => Port ( 8082 ) ,
732+ DruidRole :: Historical => Port ( 8083 ) ,
733+ DruidRole :: MiddleManager => Port ( 8091 ) ,
734+ DruidRole :: Router => Port ( 8888 ) ,
734735 }
735736 }
736737
737738 /// Returns the https port for every role
738- pub fn get_https_port ( & self ) -> u16 {
739+ pub fn get_https_port ( & self ) -> Port {
739740 match & self {
740- DruidRole :: Coordinator => 8281 ,
741- DruidRole :: Broker => 8282 ,
742- DruidRole :: Historical => 8283 ,
743- DruidRole :: MiddleManager => 8291 ,
744- DruidRole :: Router => 9088 ,
741+ DruidRole :: Coordinator => Port ( 8281 ) ,
742+ DruidRole :: Broker => Port ( 8282 ) ,
743+ DruidRole :: Historical => Port ( 8283 ) ,
744+ DruidRole :: MiddleManager => Port ( 8291 ) ,
745+ DruidRole :: Router => Port ( 9088 ) ,
745746 }
746747 }
747748
0 commit comments