Skip to content
Snippets Groups Projects
Commit f80903a7 authored by Patrick's avatar Patrick
Browse files

fix

parent f56e06f3
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,11 @@ type RestProtocol struct { ...@@ -31,7 +31,11 @@ type RestProtocol struct {
} }
func NewRestProtocol() *RestProtocol { func NewRestProtocol() *RestProtocol {
return &RestProtocol{} return &RestProtocol{
BaseProtocol: protocol.NewBaseProtocol(),
serverMap: make(map[string]rest_interface.RestServer),
clientMap: make(map[rest_interface.RestOptions]rest_interface.RestClient),
}
} }
func (rp *RestProtocol) Export(invoker protocol.Invoker) protocol.Exporter { func (rp *RestProtocol) Export(invoker protocol.Invoker) protocol.Exporter {
......
...@@ -25,7 +25,9 @@ func TestRestProtocol_Refer(t *testing.T) { ...@@ -25,7 +25,9 @@ func TestRestProtocol_Refer(t *testing.T) {
} }
config.SetConsumerConfig(con) config.SetConsumerConfig(con)
configMap := make(map[string]*rest_interface.RestConfig) configMap := make(map[string]*rest_interface.RestConfig)
configMap["com.ikurento.user.UserProvider"] = &rest_interface.RestConfig{} configMap["com.ikurento.user.UserProvider"] = &rest_interface.RestConfig{
Client: "resty",
}
SetRestConsumerServiceConfigMap(configMap) SetRestConsumerServiceConfigMap(configMap)
invoker := proto.Refer(url) invoker := proto.Refer(url)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment