dubbo.apache.org/dubbo-go/v3@v3.1.1/tools/dubbo-go-schema/dubbo-go.json (about) 1 { 2 "$comment": "JSON Schema for Dubbo-Go Framework", 3 "$schema": "http://json-schema.org/draft-07/schema", 4 "title": "Dubbo-Go Framework schema", 5 "type": "object", 6 "additionalProperties": false, 7 "required": [ 8 "dubbo" 9 ], 10 "properties": { 11 "dubbo": { 12 "type": "object", 13 "description": "The dubbo is root", 14 "properties": { 15 "profiles": { 16 "type": "object", 17 "description": "Load and merge configuration files based on active", 18 "properties": { 19 "active": { 20 "type": "string", 21 "description": "The file suffix to be loaded" 22 } 23 } 24 }, 25 "application": { 26 "$ref": "#/definitions/application" 27 }, 28 "registries": { 29 "type": "object", 30 "description": "dubbo registry", 31 "additionalProperties": false, 32 "patternProperties": { 33 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 34 "$ref": "#/definitions/registry" 35 } 36 } 37 }, 38 "protocols": { 39 "type": "object", 40 "description": "dubbo protocol", 41 "additionalProperties": false, 42 "patternProperties": { 43 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 44 "$ref": "#/definitions/protocol" 45 } 46 } 47 }, 48 "config-center": { 49 "$ref": "#/definitions/config-center" 50 }, 51 "metadata-report": { 52 "$ref": "#/definitions/metadata-report" 53 }, 54 "provider": { 55 "$ref": "#/definitions/provider" 56 }, 57 "consumer": { 58 "$ref": "#/definitions/consumer" 59 }, 60 "metrics": { 61 "type": "object", 62 "description": "metric", 63 "additionalProperties": false, 64 "patternProperties": { 65 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 66 "$ref": "#/definitions/metric" 67 } 68 } 69 }, 70 "tracing": { 71 "type": "object", 72 "description": "tracing", 73 "additionalProperties": false, 74 "patternProperties": { 75 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 76 "$ref": "#/definitions/tracing" 77 } 78 } 79 }, 80 "shutdown": { "$ref": "#/definitions/shutdown"} 81 } 82 } 83 }, 84 "definitions": { 85 "registry": { 86 "type": "object", 87 "description": "Registry center", 88 "additionalProperties": false, 89 "properties": { 90 "protocol": { 91 "type": "string", 92 "description": "Registry protocol", 93 "enum": [ 94 "nacos", 95 "etcdv3", 96 "polaris", 97 "xds", 98 "zookeeper", 99 "service-discovery-registry" 100 ] 101 }, 102 "timeout": { 103 "type": "string", 104 "description": "Registry timeout default 5s" 105 }, 106 "group": { 107 "type": "string", 108 "description": "Registry group" 109 }, 110 "namespace": { 111 "type": "string", 112 "description": "Registry namespace" 113 }, 114 "ttl": { 115 "type": "string", 116 "description": "Registry ttl default 10s" 117 }, 118 "address": { 119 "type": "string", 120 "description": "Registry address support format {protocol}://address" 121 }, 122 "username": { 123 "type": "string", 124 "description": "Registry username for auth" 125 }, 126 "password": { 127 "type": "string", 128 "description": "Registry password for auth" 129 }, 130 "simplified": { 131 "type": "boolean", 132 "description": "Simplified registry" 133 }, 134 "preferred": { 135 "type": "boolean", 136 "description": "Always use this registry first if set to true, useful when subscribe to multiple registriesConfig" 137 }, 138 "zone": { 139 "type": "string", 140 "description": "The region where the registry belongs, usually used to isolate traffics" 141 }, 142 "weight": { 143 "type": "integer", 144 "default": 100, 145 "description": "Affects traffic distribution among registriesConfig, useful when subscribe to multiple registriesConfig Take effect only when no preferred registry is specified." 146 }, 147 "registry-type": { 148 "type": "string", 149 "description": "Registry Interface discovery or application discovery default Interface discovery", 150 "enum": [ 151 "service" 152 ] 153 }, 154 "params": { 155 "type": "object", 156 "description": "Other parameters for registry are passed to the corresponding registry in key-value mode" 157 } 158 } 159 }, 160 "application": { 161 "type": "object", 162 "additionalProperties": false, 163 "description": "Application is a configuration for current application, whether the application is a provider or a consumer", 164 "properties": { 165 "organization": { 166 "type": "string", 167 "description": "default dubbo-go" 168 }, 169 "name": { 170 "type": "string", 171 "description": "default dubbo.io" 172 }, 173 "module": { 174 "type": "string", 175 "description": "default sample" 176 }, 177 "group": { 178 "type": "string" 179 }, 180 "version": { 181 "type": "string" 182 }, 183 "owner": { 184 "type": "string", 185 "description": "default dubbo-go" 186 }, 187 "environment": { 188 "type": "string" 189 }, 190 "metadata-type": { 191 "type": "string", 192 "description": "The metadata type. remote or local default local", 193 "enum": [ 194 "local", 195 "remote" 196 ] 197 } 198 } 199 }, 200 "protocol": { 201 "type": "object", 202 "additionalProperties": false, 203 "properties": { 204 "name": { 205 "type": "string", 206 "description": "default dubbo", 207 "default": "dubbo", 208 "enum": [ 209 "dubbo", 210 "rest", 211 "grpc", 212 "filter", 213 "jsonrpc", 214 "tri", 215 "registry" 216 ] 217 }, 218 "ip": { 219 "type": "string" 220 }, 221 "port": { 222 "type": "number", 223 "description": "default 20000" 224 }, 225 "params": { 226 "type": "object" 227 } 228 } 229 }, 230 "config-center": { 231 "type": "object", 232 "description": "config center", 233 "additionalProperties": false, 234 "properties": { 235 "protocol": { 236 "type": "string", 237 "description": "config center protocol", 238 "enum": [ 239 "nacos", 240 "apollo", 241 "file", 242 "zookeeper" 243 ] 244 }, 245 "address": { 246 "type": "string", 247 "description": "Registry address support format {protocol}://address" 248 }, 249 "data-id": { 250 "type": "string", 251 "description": "data id for nacos" 252 }, 253 "app-id": { 254 "type": "string", 255 "description": "data id for nacos" 256 }, 257 "cluster": { 258 "type": "string" 259 }, 260 "username": { 261 "type": "string" 262 }, 263 "password": { 264 "type": "string" 265 }, 266 "group": { 267 "type": "string" 268 }, 269 "namespace": { 270 "type": "string" 271 }, 272 "params": { 273 "type": "object", 274 "description": "Other parameters for registry are passed to the corresponding registry in key-value mode" 275 }, 276 "timeout": { 277 "type": "string", 278 "description": "Registry timeout", 279 "default": "5s" 280 }, 281 "file-extension": { 282 "type": "string", 283 "description": "the suffix of config dataId, also the file extension of config content", 284 "enum": [ 285 "json", 286 "toml", 287 "yaml", 288 "yml", 289 "properties" 290 ] 291 } 292 } 293 }, 294 "metadata-report": { 295 "type": "object", 296 "description": "metadata report", 297 "additionalProperties": false, 298 "properties": { 299 "protocol": { 300 "type": "string" 301 }, 302 "address": { 303 "type": "string", 304 "description": "Registry address support format {protocol}://address" 305 }, 306 "username": { 307 "type": "string" 308 }, 309 "password": { 310 "type": "string" 311 }, 312 "group": { 313 "type": "string" 314 }, 315 "namespace": { 316 "type": "string" 317 }, 318 "timeout": { 319 "type": "string", 320 "description": "metadata report timeout", 321 "default": "20s" 322 } 323 } 324 }, 325 "provider": { 326 "type": "object", 327 "description": "provider", 328 "additionalProperties": false, 329 "properties": { 330 "filter": { 331 "type": "string" 332 }, 333 "register": { 334 "type": "boolean" 335 }, 336 "registry-ids": { 337 "type": "array" 338 }, 339 "tracing-key": { 340 "type": "string" 341 }, 342 "proxy": { 343 "type": "string", 344 "default": "default" 345 }, 346 "adaptive-service": { 347 "type": "boolean" 348 }, 349 "adaptive-service-verbose": { 350 "type": "boolean" 351 }, 352 "services": { 353 "type": "object", 354 "description": "provider services", 355 "additionalProperties": false, 356 "patternProperties": { 357 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 358 "$ref": "#/definitions/services" 359 } 360 } 361 } 362 } 363 }, 364 "consumer": { 365 "type": "object", 366 "description": "consumer", 367 "additionalProperties": false, 368 "properties": { 369 "filter": { 370 "type": "string" 371 }, 372 "registry-ids": { 373 "type": "array" 374 }, 375 "request-timeout": { 376 "type": "string", 377 "default": "3s" 378 }, 379 "proxy": { 380 "type": "string", 381 "default": "default" 382 }, 383 "check": { 384 "type": "boolean" 385 }, 386 "adaptive-service": { 387 "type": "boolean" 388 }, 389 "tracing-key": { 390 "type": "string" 391 }, 392 "max-wait-time-for-service-discovery": { 393 "type": "string", 394 "default": "3s" 395 }, 396 "references": { 397 "type": "object", 398 "description": "consumer reference", 399 "additionalProperties": false, 400 "patternProperties": { 401 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 402 "$ref": "#/definitions/reference" 403 } 404 } 405 } 406 } 407 }, 408 "services": { 409 "type": "object", 410 "description": "provider service", 411 "additionalProperties": false, 412 "properties": { 413 "filter": { 414 "type": "string" 415 }, 416 "protocol-ids": { 417 "type": "array" 418 }, 419 "interface": { 420 "type": "string" 421 }, 422 "registry-ids": { 423 "type": "array" 424 }, 425 "cluster": { 426 "type": "string", 427 "default": "failover" 428 }, 429 "loadbalance": { 430 "$ref": "#/definitions/loadbalance" 431 }, 432 "retries": { 433 "type": "number", 434 "description": "Retry count", 435 "default": 2 436 }, 437 "group": { 438 "type": "string" 439 }, 440 "version": { 441 "type": "string" 442 }, 443 "serialization": { 444 "$ref": "#/definitions/serialization" 445 }, 446 "methods": { 447 "type": "object", 448 "description": "metadata report", 449 "additionalProperties": false, 450 "patternProperties": { 451 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 452 "$ref": "#/definitions/method" 453 } 454 } 455 }, 456 "warmup": { 457 "type": "number", 458 "description": "get service register time an do warm up time", 459 "default": 600 460 }, 461 "params": { 462 "type": "object" 463 }, 464 "token": { 465 "type": "string", 466 "description": "if set `true` or `default` use uuid" 467 }, 468 "accesslog": { 469 "type": "string" 470 }, 471 "tps.limiter": { 472 "$ref": "#/definitions/tps.limiter" 473 }, 474 "tps.limit.interval": { 475 "type": "integer" 476 }, 477 "tps.limit.strategy": { 478 "$ref": "#/definitions/tps.limit.strategy" 479 }, 480 "tps.limit.rate": { 481 "type": "integer" 482 }, 483 "tps.limit.rejected.handler": { 484 "type": "string", 485 "default": "log" 486 }, 487 "execute.limit": { 488 "type": "number" 489 }, 490 "execute.limit.rejected.handler": { 491 "type": "string", 492 "default": "log" 493 }, 494 "auth": { 495 "type": "boolean", 496 "default": false 497 }, 498 "param.sign": { 499 "type": "boolean", 500 "default": false 501 }, 502 "tag": { 503 "type": "string" 504 }, 505 "max_message_size": { 506 "type": "integer", 507 "default": 4 508 }, 509 "tracing-key": { 510 "type": "string" 511 } 512 } 513 }, 514 "reference": { 515 "type": "object", 516 "description": "consumer reference", 517 "properties": { 518 "interface": { 519 "type": "string" 520 }, 521 "check": { 522 "type": "boolean" 523 }, 524 "url": { 525 "type": "string" 526 }, 527 "filter": { 528 "type": "string" 529 }, 530 "protocol": { 531 "type": "string", 532 "default": "tri" 533 }, 534 "registry-ids": { 535 "type": "array" 536 }, 537 "cluster": { 538 "type": "string", 539 "default": "failover" 540 }, 541 "loadbalance": { 542 "$ref": "#/definitions/loadbalance" 543 }, 544 "group": { 545 "type": "string" 546 }, 547 "version": { 548 "type": "string" 549 }, 550 "serialization": { 551 "$ref": "#/definitions/serialization" 552 }, 553 "methods": { 554 "type": "object", 555 "description": "metadata report", 556 "additionalProperties": false, 557 "patternProperties": { 558 "^[_a-zA-Z][a-zA-Z\\d_-]*$": { 559 "$ref": "#/definitions/method" 560 } 561 } 562 }, 563 "async": { 564 "type": "boolean" 565 }, 566 "params": { 567 "type": "object" 568 }, 569 "generic": { 570 "type": "boolean" 571 }, 572 "sticky": { 573 "type": "boolean" 574 }, 575 "timeout": { 576 "type": "string" 577 }, 578 "force.tag": { 579 "type": "boolean" 580 }, 581 "tracing-key": { 582 "type": "string" 583 } 584 } 585 }, 586 "method": { 587 "type": "object", 588 "description": "metadata report", 589 "additionalProperties": false, 590 "properties": { 591 "name": { 592 "type": "string" 593 }, 594 "retries": { 595 "type": "number", 596 "description": "Retry count", 597 "default": 2 598 }, 599 "loadbalance": { 600 "$ref": "#/definitions/loadbalance" 601 }, 602 "weight": { 603 "type": "integer", 604 "default": 100 605 }, 606 "tps.limit.interval": { 607 "type": "integer" 608 }, 609 "tps.limit.rate": { 610 "type": "integer" 611 }, 612 "tps.limit.strategy": { 613 "$ref": "#/definitions/tps.limit.strategy" 614 }, 615 "execute.limit": { 616 "type": "number" 617 }, 618 "execute.limit.rejected.handler": { 619 "type": "string", 620 "default": "log" 621 }, 622 "sticky": { 623 "type": "boolean" 624 }, 625 "timeout": { 626 "type": "string" 627 } 628 } 629 }, 630 "loadbalance": { 631 "type": "string", 632 "default": "random", 633 "enum": [ 634 "roundrobin", 635 "consistenthashing", 636 "leastactive", 637 "xdsringhash", 638 "p2c", 639 "random" 640 ] 641 }, 642 "serialization": { 643 "type": "string", 644 "enum": [ 645 "protobuf", 646 "hessian2", 647 "msgpack", 648 "jsonMapStruct" 649 ] 650 }, 651 "tps.limit.strategy": { 652 "type": "string", 653 "enum": [ 654 "threadSafeFixedWindow", 655 "slidingWindow", 656 "fixedWindow", 657 "default" 658 ] 659 }, 660 "tps.limiter": { 661 "type": "string", 662 "description": "allows developer to config both method-level and service-level tps limiter.", 663 "enum": [ 664 "method-service", 665 "default" 666 ] 667 }, 668 "metric": { 669 "type": "object", 670 "description": "metadata report", 671 "additionalProperties": false, 672 "properties": { 673 "mode": { 674 "type": "string", 675 "default": "pull" 676 }, 677 "namespace": { 678 "type": "string", 679 "default": "dubbo" 680 }, 681 "enable": { 682 "type": "boolean", 683 "default": true 684 }, 685 "port": { 686 "type": "integer", 687 "default": 9090 688 }, 689 "path": { 690 "type": "string", 691 "default": "/metrics" 692 }, 693 "push-gateway-address": { 694 "type": "string" 695 } 696 } 697 }, 698 "tracing": { 699 "type": "object", 700 "description": "metadata report", 701 "additionalProperties": false, 702 "properties": { 703 "name": { 704 "type": "string", 705 "default": "jaeger" 706 }, 707 "serviceName": { 708 "type": "string" 709 }, 710 "address": { 711 "type": "string" 712 }, 713 "use-agent": { 714 "type": "boolean", 715 "default": false 716 } 717 } 718 }, 719 "shutdown": { 720 "type": "object", 721 "description": "metadata report", 722 "additionalProperties": false, 723 "properties": { 724 "timeout": { 725 "type": "string", 726 "default": "60s" 727 }, 728 "step-timeout": { 729 "type": "string", 730 "default": "3s" 731 }, 732 "consumer-update-wait-time": { 733 "type": "string", 734 "default": "3s" 735 }, 736 "reject-handler": { 737 "type": "string" 738 }, 739 "internal-signal": { 740 "type": "boolean", 741 "default": true 742 } 743 } 744 } 745 } 746 }