feat: conf inherit (#2568)
* feat: add ValuerWithParent * feat: make etcd config inherit from parents * chore: add more tests * chore: add more tests * chore: add more comments * chore: refactor * chore: add more comments * fix: fix duplicated code and refactor * fix: remove unnecessary code * fix: fix test case for removing print * feat: support partial inherit
This commit is contained in:
@@ -12,7 +12,7 @@ type (
|
||||
RpcServerConf struct {
|
||||
service.ServiceConf
|
||||
ListenOn string
|
||||
Etcd discov.EtcdConf `json:",optional"`
|
||||
Etcd discov.EtcdConf `json:",optional,inherit"`
|
||||
Auth bool `json:",optional"`
|
||||
Redis redis.RedisKeyConf `json:",optional"`
|
||||
StrictControl bool `json:",optional"`
|
||||
@@ -25,7 +25,7 @@ type (
|
||||
|
||||
// A RpcClientConf is a rpc client config.
|
||||
RpcClientConf struct {
|
||||
Etcd discov.EtcdConf `json:",optional"`
|
||||
Etcd discov.EtcdConf `json:",optional,inherit"`
|
||||
Endpoints []string `json:",optional"`
|
||||
Target string `json:",optional"`
|
||||
App string `json:",optional"`
|
||||
|
||||
Reference in New Issue
Block a user