Skip to content

Commit

Permalink
fix: change IDs to -ids
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Oct 27, 2021
1 parent e4723f4 commit 4d4fb6e
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion config/consumer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
type ConsumerConfig struct {
Filter string `yaml:"filter" json:"filter,omitempty" property:"filter"`
// support string
RegistryIDs []string `yaml:"registryIDs" json:"registryIDs,omitempty" property:"registryIDs"`
RegistryIDs []string `yaml:"registry-ids" json:"registry-ids,omitempty" property:"registry-ids"`

RequestTimeout string `default:"3s" yaml:"request-timeout" json:"request-timeout,omitempty" property:"request-timeout"`
ProxyFactory string `default:"default" yaml:"proxy" json:"proxy,omitempty" property:"proxy"`
Expand Down
2 changes: 1 addition & 1 deletion config/provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type ProviderConfig struct {
// Deprecated Register whether registration is required
Register bool `yaml:"register" json:"register" property:"register"`
// RegistryIDs is registry ids list
RegistryIDs []string `yaml:"registryIDs" json:"registryIDs" property:"registryIDs"`
RegistryIDs []string `yaml:"registry-ids" json:"registry-ids" property:"registry-ids"`
// Services services
Services map[string]*ServiceConfig `yaml:"services" json:"services,omitempty" property:"services"`

Expand Down
2 changes: 1 addition & 1 deletion config/reference_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type ReferenceConfig struct {
URL string `yaml:"url" json:"url,omitempty" property:"url"`
Filter string `yaml:"filter" json:"filter,omitempty" property:"filter"`
Protocol string `default:"dubbo" yaml:"protocol" json:"protocol,omitempty" property:"protocol"`
RegistryIDs []string `yaml:"registryIDs" json:"registryIDs,omitempty" property:"registryIDs"`
RegistryIDs []string `yaml:"registry-ids" json:"registry-ids,omitempty" property:"registry-ids"`
Cluster string `yaml:"cluster" json:"cluster,omitempty" property:"cluster"`
Loadbalance string `yaml:"loadbalance" json:"loadbalance,omitempty" property:"loadbalance"`
Retries string `yaml:"retries" json:"retries,omitempty" property:"retries"`
Expand Down
4 changes: 2 additions & 2 deletions config/service_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ import (
type ServiceConfig struct {
id string
Filter string `yaml:"filter" json:"filter,omitempty" property:"filter"`
ProtocolIDs []string `default:"[\"dubbo\"]" validate:"required" yaml:"protocolIDs" json:"protocolIDs,omitempty" property:"protocolIDs"` // multi protocolIDs support, split by ','
ProtocolIDs []string `default:"[\"dubbo\"]" validate:"required" yaml:"protocol-ids" json:"protocol-ids,omitempty" property:"protocol-ids"` // multi protocolIDs support, split by ','
Interface string `validate:"required" yaml:"interface" json:"interface,omitempty" property:"interface"`
RegistryIDs []string `yaml:"registryIDs" json:"registryIDs,omitempty" property:"registryIDs"`
RegistryIDs []string `yaml:"registry-ids" json:"registry-ids,omitempty" property:"registry-ids"`
Cluster string `default:"failover" yaml:"cluster" json:"cluster,omitempty" property:"cluster"`
Loadbalance string `default:"random" yaml:"loadbalance" json:"loadbalance,omitempty" property:"loadbalance"`
Group string `yaml:"group" json:"group,omitempty" property:"group"`
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dubbo:
services:
helloService:
interface: org.dubbo.service.HelloService
registryIDs: nacos,zk
registry-ids: nacos,zk
orderService:
interface: org.dubbo.service.OrderService
registryIDs: nacos
registry-ids: nacos
provider:
register: true
services:
2 changes: 1 addition & 1 deletion config/testdata/config/app/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dubbo:
interface: org.github.dubbo.HelloService # must be compatible with grpc or dubbo-java
provider:
register: true
registryIDs: nacos
registry-ids: nacos
services:
helloService:
protocol: dubbo
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/config/provider/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ dubbo:
address: nacos://127.0.0.1:8848
provider:
register: true
registryIDs:
registry-ids:
- nacos
- zk
services:
helloService:
interface: org.dubbo.service.HelloService
registryIDs: nacos,zk
registry-ids: nacos,zk
orderService:
interface: org.dubbo.service.OrderService
4 changes: 2 additions & 2 deletions config/testdata/config/provider/registry_application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ dubbo:
timeout: 3s
address: naocs://127.0.0.1:8848
provider:
registryIDs: nacos
registry-ids: nacos
services:
HelloService:
interface: org.dubbo.service.HelloService
registryIDs: nacos,zk
registry-ids: nacos,zk
OrderService:
interface: org.dubbo.service.OrderService
2 changes: 1 addition & 1 deletion config/testdata/consumer_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ registries :

references:
"UserProvider":
registryIDs: "hangzhouzk,shanghaizk"
registry-ids: "hangzhouzk,shanghaizk"
filter: ""
protocol : "dubbo"
version: "1.0"
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/consumer_config_with_configcenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config_center:
address: "127.0.0.1"
references:
"UserProvider":
registryIDs: "hangzhouzk,shanghaizk"
registry-ids: "hangzhouzk,shanghaizk"
filter: ""
protocol : "dubbo"
interface : "com.ikurento.user.UserProvider"
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/consumer_config_withoutProtocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ registries :

references:
"UserProvider":
registryIDs: "hangzhouzk,shanghaizk"
registry-ids: "hangzhouzk,shanghaizk"
filter: ""
version: "1.0"
group: "as"
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/provider_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ registries :

services:
"UserProvider":
registryIDs: "hangzhouzk,shanghaizk"
registry-ids: "hangzhouzk,shanghaizk"
filter: ""
# the name of limiter
tps.limiter: "default"
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/provider_config_withoutProtocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ registries :

services:
"UserProvider":
registryIDs: "hangzhouzk,shanghaizk"
registry-ids: "hangzhouzk,shanghaizk"
filter: ""
# equivalent to interface of dubbo.xml
interface : "com.ikurento.user.UserProvider"
Expand Down
1 change: 1 addition & 0 deletions config_center/apollo/mockDubbogo.yaml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"appId":"testApplication_yang","cluster":"default","namespaceName":"mockDubbogo.yaml","releaseKey":"20191104105242-0f13805d89f834a4","configurations":{"registries.hangzhouzk.username":"11111"}}

0 comments on commit 4d4fb6e

Please sign in to comment.