2
2
3
3
use std:: collections:: HashMap ;
4
4
5
+ #[ cfg( feature = "amqp" ) ]
6
+ use rsjudge_amqp:: config:: AmqpConfig ;
5
7
#[ cfg( feature = "grpc" ) ]
6
8
use rsjudge_grpc:: config:: GrpcConfig ;
7
- #[ cfg( feature = "rabbitmq" ) ]
8
- use rsjudge_rabbitmq:: config:: RabbitMqConfig ;
9
9
#[ cfg( feature = "rest" ) ]
10
10
use rsjudge_rest:: config:: RestConfig ;
11
11
use rsjudge_traits:: language:: config:: LanguageDef ;
@@ -21,8 +21,8 @@ pub struct Config {
21
21
pub struct Services {
22
22
#[ cfg( feature = "grpc" ) ]
23
23
pub grpc : GrpcConfig ,
24
- #[ cfg( feature = "rabbitmq " ) ]
25
- pub rabbitmq : RabbitMqConfig ,
24
+ #[ cfg( feature = "amqp " ) ]
25
+ pub amqp : AmqpConfig ,
26
26
#[ cfg( feature = "rest" ) ]
27
27
pub rest : RestConfig ,
28
28
}
@@ -32,10 +32,10 @@ mod tests {
32
32
#[ cfg( any( feature = "grpc" , feature = "rest" ) ) ]
33
33
use std:: net:: { Ipv4Addr , Ipv6Addr , SocketAddr , SocketAddrV4 , SocketAddrV6 } ;
34
34
35
+ #[ cfg( feature = "amqp" ) ]
36
+ use rsjudge_amqp:: config:: AmqpConfig ;
35
37
#[ cfg( feature = "grpc" ) ]
36
38
use rsjudge_grpc:: config:: GrpcConfig ;
37
- #[ cfg( feature = "rabbitmq" ) ]
38
- use rsjudge_rabbitmq:: config:: RabbitMqConfig ;
39
39
#[ cfg( feature = "rest" ) ]
40
40
use rsjudge_rest:: config:: RestConfig ;
41
41
@@ -60,8 +60,8 @@ mod tests {
60
60
SocketAddr :: V6 ( SocketAddrV6 :: new( Ipv6Addr :: UNSPECIFIED , 80 , 0 , 0 ) )
61
61
]
62
62
} ,
63
- #[ cfg( feature = "rabbitmq " ) ]
64
- rabbitmq : RabbitMqConfig {
63
+ #[ cfg( feature = "amqp " ) ]
64
+ amqp : AmqpConfig {
65
65
uri: "amqp://user:bitnami@localhost" . to_owned( )
66
66
} ,
67
67
} ) ?
0 commit comments