chore: renaming configs (#2234)
This commit is contained in:
@@ -29,11 +29,12 @@ type (
|
||||
Upstream struct {
|
||||
// Grpc is the target of the upstream.
|
||||
Grpc zrpc.RpcClientConf
|
||||
// ProtoSets is the file list of proto set, like [hello.pb]
|
||||
// if your proto file import another proto file, you need to write multi-file slice, like [hello.pb, common.pb]
|
||||
// ProtoSets is the file list of proto set, like [hello.pb].
|
||||
// if your proto file import another proto file, you need to write multi-file slice,
|
||||
// like [hello.pb, common.pb].
|
||||
ProtoSets []string `json:",optional"`
|
||||
// Mapping is the mapping between gateway routes and Upstream rpc methods.
|
||||
// Mappings is the mapping between gateway routes and Upstream rpc methods.
|
||||
// Keep it blank if annotations are added in rpc methods.
|
||||
Mapping []RouteMapping `json:",optional"`
|
||||
Mappings []RouteMapping `json:",optional"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ func (s *Server) build() error {
|
||||
for _, m := range methods {
|
||||
methodSet[m.RpcPath] = struct{}{}
|
||||
}
|
||||
for _, m := range up.Mapping {
|
||||
for _, m := range up.Mappings {
|
||||
if _, ok := methodSet[m.RpcPath]; !ok {
|
||||
cancel(fmt.Errorf("rpc method %s not found", m.RpcPath))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user