22
33use std:: collections:: HashMap ;
44
5+ #[ cfg( feature = "amqp" ) ]
6+ use rsjudge_amqp:: config:: AmqpConfig ;
57#[ cfg( feature = "grpc" ) ]
68use rsjudge_grpc:: config:: GrpcConfig ;
7- #[ cfg( feature = "rabbitmq" ) ]
8- use rsjudge_rabbitmq:: config:: RabbitMqConfig ;
99#[ cfg( feature = "rest" ) ]
1010use rsjudge_rest:: config:: RestConfig ;
1111use rsjudge_traits:: language:: config:: LanguageDef ;
@@ -21,8 +21,8 @@ pub struct Config {
2121pub struct Services {
2222 #[ cfg( feature = "grpc" ) ]
2323 pub grpc : GrpcConfig ,
24- #[ cfg( feature = "rabbitmq " ) ]
25- pub rabbitmq : RabbitMqConfig ,
24+ #[ cfg( feature = "amqp " ) ]
25+ pub amqp : AmqpConfig ,
2626 #[ cfg( feature = "rest" ) ]
2727 pub rest : RestConfig ,
2828}
@@ -32,10 +32,10 @@ mod tests {
3232 #[ cfg( any( feature = "grpc" , feature = "rest" ) ) ]
3333 use std:: net:: { Ipv4Addr , Ipv6Addr , SocketAddr , SocketAddrV4 , SocketAddrV6 } ;
3434
35+ #[ cfg( feature = "amqp" ) ]
36+ use rsjudge_amqp:: config:: AmqpConfig ;
3537 #[ cfg( feature = "grpc" ) ]
3638 use rsjudge_grpc:: config:: GrpcConfig ;
37- #[ cfg( feature = "rabbitmq" ) ]
38- use rsjudge_rabbitmq:: config:: RabbitMqConfig ;
3939 #[ cfg( feature = "rest" ) ]
4040 use rsjudge_rest:: config:: RestConfig ;
4141
@@ -60,8 +60,8 @@ mod tests {
6060 SocketAddr :: V6 ( SocketAddrV6 :: new( Ipv6Addr :: UNSPECIFIED , 80 , 0 , 0 ) )
6161 ]
6262 } ,
63- #[ cfg( feature = "rabbitmq " ) ]
64- rabbitmq : RabbitMqConfig {
63+ #[ cfg( feature = "amqp " ) ]
64+ amqp : AmqpConfig {
6565 uri: "amqp://user:bitnami@localhost" . to_owned( )
6666 } ,
6767 } ) ?
0 commit comments