tianxiaoliang commented on code in PR #1323:
URL:
https://github.com/apache/servicecomb-service-center/pull/1323#discussion_r939979379
##########
server/ext/policy/buitin.go:
##########
@@ -0,0 +1,51 @@
+package policy
+
+import (
+ "github.com/apache/servicecomb-service-center/server/service/grc"
+ "k8s.io/kube-openapi/pkg/validation/spec"
+)
+
+func init() {
+ grc.RegisterPolicySchema("loadbalancer", &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"object"},
+ Required: []string{"rule"},
+ Properties: map[string]spec.Schema{
+ "rule": {
+ SchemaProps: spec.SchemaProps{Type:
[]string{"string"}}},
+ },
+ }})
+ grc.RegisterPolicySchema("circuitBreaker", &spec.Schema{
Review Comment:
其实也可以。我开放open api后,就可以拿json格式提交了
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]