@@ -106,7 +106,11 @@ impl RootConfig {
106
106
. serializer ( "json" . to_string ( ) )
107
107
. version ( "1.0.0" . to_string ( ) )
108
108
. protocol_names ( "triple" . to_string ( ) )
109
- . name ( "grpc.examples.echo.Echo" . to_string ( ) ) ;
109
+ // Currently, the hello_echo.rs doesn't support the url which like
110
+ // `{protocol}/{service config name}/{service name}(e.g. triple://0.0.0.0:8888/{service config name}/grpc.examples.echo.Echo).
111
+ // So we comment this line.
112
+ // .name("grpc.examples.echo.Echo".to_strdding())
113
+ . registry ( "zookeeper" . to_string ( ) ) ;
110
114
111
115
let triple_config = ProtocolConfig :: default ( )
112
116
. name ( "triple" . to_string ( ) )
@@ -122,8 +126,9 @@ impl RootConfig {
122
126
. group ( "test" . to_string ( ) )
123
127
. serializer ( "json" . to_string ( ) )
124
128
. version ( "1.0.0" . to_string ( ) )
125
- . name ( "helloworld.Greeter" . to_string ( ) )
126
- . protocol_names ( "triple" . to_string ( ) ) ,
129
+ // .name("helloworld.Greeter".to_string())
130
+ . protocol_names ( "triple" . to_string ( ) )
131
+ . registry ( "zookeeper" . to_string ( ) ) ,
127
132
) ;
128
133
self . protocols . insert (
129
134
"triple" . to_string ( ) ,
@@ -135,6 +140,14 @@ impl RootConfig {
135
140
136
141
provider. services = self . service . clone ( ) ;
137
142
self . provider = provider. clone ( ) ;
143
+
144
+ let mut registries = HashMap :: new ( ) ;
145
+ registries. insert (
146
+ "zookeeper" . to_string ( ) ,
147
+ "zookeeper://localhost:2181" . to_string ( ) ,
148
+ ) ;
149
+ self . registries = registries;
150
+
138
151
println ! ( "provider config: {:?}" , provider) ;
139
152
// 通过环境变量读取某个文件。加在到内存中
140
153
self . data . insert (
0 commit comments