├── .github ├── actions │ ├── actions-ding │ │ ├── .gitignore │ │ ├── .eslintignore │ │ ├── .prettierignore │ │ ├── .editorconfig │ │ ├── .prettierrc.json │ │ ├── action.yml │ │ ├── tsconfig.json │ │ ├── LICENSE │ │ ├── package.json │ │ └── src │ │ │ └── index.ts │ └── review-dog │ │ ├── testdata │ │ └── main.go │ │ ├── .github │ │ ├── .golangci.yml │ │ ├── renovate.json │ │ └── workflows │ │ │ └── release.yml │ │ ├── LICENSE │ │ └── script.sh ├── ISSUE_TEMPLATE │ ├── enhancement.md │ └── bug-report.md ├── PULL_REQUEST_TEMPLATE.md └── auto-comment.yml ├── xds ├── dubbo-go-istio │ └── server │ │ ├── .gitignore │ │ ├── build │ │ ├── DockerfilePixiu │ │ └── Dockerfile │ │ ├── cmd │ │ └── app.go │ │ ├── chart │ │ ├── app │ │ │ └── templates │ │ │ │ ├── serviceaccount.yaml │ │ │ │ └── service.yaml │ │ ├── pixiu-gateway │ │ │ └── templates │ │ │ │ ├── serviceaccount.yaml │ │ │ │ └── service.yaml │ │ └── nacos_env │ │ │ └── templates │ │ │ └── service.yaml │ │ ├── conf │ │ └── dubbogo.yaml │ │ ├── api │ │ └── api.proto │ │ └── pkg │ │ └── service │ │ └── service.go ├── filesystem-control-panel │ ├── server │ │ ├── go.mod │ │ └── logger.go │ ├── pixiu │ │ ├── cds.json │ │ ├── lds.json │ │ └── conf.yaml │ └── readme.md └── local-control-panel │ ├── server │ └── app │ │ ├── go.mod │ │ └── logger.go │ ├── readme.md │ └── pixiu │ └── conf.yaml ├── plugins ├── index.md ├── opa │ ├── docker │ │ └── docker-compose.yml │ ├── test │ │ └── pixiu_test.go │ └── server │ │ └── app │ │ └── server.go └── ratelimit │ └── server │ └── app │ └── server.go ├── admin └── sample.md ├── dubbogo ├── simple │ ├── nacos_farconf │ │ ├── farconfnacos.png │ │ ├── pixiu │ │ │ └── conf.yaml │ │ ├── README_zh.md │ │ └── docker │ │ │ └── docker-compose.yml │ ├── body │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ └── server.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ └── request.sh │ ├── mix │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ └── request.sh │ ├── uri │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── request.sh │ │ └── conf.yaml │ ├── benchmark │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── conf │ │ │ └── dubbogo.yaml │ │ └── request.sh │ ├── jaeger │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── log.yml │ │ │ │ └── server.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ └── request.sh │ ├── proxy │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── request.sh │ │ └── pixiu │ │ │ └── api_config.yaml │ ├── query │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ └── request.sh │ ├── zookeeper │ │ ├── server │ │ │ ├── app │ │ │ │ └── version.go │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── pixiu │ │ │ └── conf.yaml │ │ └── test │ │ │ └── pixiu_test.go │ ├── direct │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── server │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── server.yml │ │ │ │ └── log.yml │ │ └── pixiu │ │ │ └── conf.yaml │ ├── resolve │ │ ├── docker │ │ │ └── docker-compose.yml │ │ └── server │ │ │ └── profiles │ │ │ └── dev │ │ │ ├── server.yml │ │ │ └── log.yml │ ├── traffic │ │ ├── docker │ │ │ └── docker-compose.yml │ │ ├── readme.md │ │ └── server │ │ │ ├── server.go │ │ │ ├── v1 │ │ │ └── server.go │ │ │ ├── v2 │ │ │ └── server.go │ │ │ └── v3 │ │ │ └── server.go │ ├── triple │ │ ├── docker │ │ │ ├── docker-health-check.sh │ │ │ └── docker-compose.yml │ │ ├── server │ │ │ ├── profiles │ │ │ │ └── dev │ │ │ │ │ ├── log.yml │ │ │ │ │ └── server.yml │ │ │ └── protobuf │ │ │ │ └── api │ │ │ │ └── samples_api.proto │ │ ├── protobuf │ │ │ └── api │ │ │ │ └── helloworld.proto │ │ └── test │ │ │ └── pixiu_test.go │ ├── nacos │ │ ├── docker │ │ │ ├── docker-health-check.sh │ │ │ └── docker-compose.yml │ │ ├── server │ │ │ └── profiles │ │ │ │ └── dev │ │ │ │ ├── log.yml │ │ │ │ └── server.yml │ │ ├── pixiu │ │ │ └── conf.yaml │ │ └── test │ │ │ └── pixiu_test.go │ ├── jwt │ │ └── server │ │ │ └── profiles │ │ │ └── dev │ │ │ └── log.yml │ ├── README_CN.md │ ├── prometheus │ │ └── server │ │ │ └── app │ │ │ └── server.go │ └── csrf │ │ └── server │ │ └── server.go └── multi │ └── server │ ├── app │ └── version.go │ └── profiles │ └── dev │ ├── log.yml │ └── server.yml ├── mcp ├── README_zh.md └── README.md ├── .gitmodules ├── .gitignore ├── llm ├── nacos │ ├── .env.example │ ├── README_zh.md │ ├── README.md │ ├── registry │ │ ├── go.mod │ │ └── Dockerfile │ ├── test │ │ └── request.sh │ └── docker-compose.yml └── bestpractise │ ├── .env.example │ ├── go-client │ └── .env.example │ ├── README_zh.md │ ├── prometheus.yml │ ├── docker-compose.yml │ ├── test │ └── request.sh │ └── README.md ├── springcloud ├── nacos │ ├── server │ │ ├── auth-service │ │ │ ├── start.sh │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ └── user-service │ │ │ ├── start.sh │ │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── application.properties │ └── docker │ │ └── docker-compose.yml └── zookeeper │ ├── server │ ├── server-zk │ │ ├── start.sh │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── application.yml │ └── server-zk-alibaba │ │ ├── start.sh │ │ └── src │ │ └── main │ │ └── resources │ │ └── application.yml │ └── docker │ └── docker-compose.yml ├── dubbohttpproxy ├── docker │ └── docker-compose.yml └── server │ └── dubbo │ └── profiles │ └── dev │ └── server.yml ├── dubbotripleproxy ├── docker │ └── docker-compose.yml └── server │ ├── dubbo │ └── profiles │ │ └── dev │ │ └── server.yml │ └── triple │ └── profiles │ └── dev │ └── server.yml ├── .licenserc.yaml ├── grpc ├── simple │ └── README_CN.md └── deprecated │ └── proto │ └── hello_grpc.proto ├── .asf.yaml ├── http ├── simple │ └── request.sh └── grpc │ └── proto │ └── hello_grpc.proto ├── shutdown ├── triple │ └── server │ │ └── app │ │ └── server.go ├── http │ └── server │ │ └── app │ │ └── server.go ├── dubbo │ └── server │ │ └── app │ │ └── server.go └── http2 │ └── server │ └── app │ └── server.go ├── start_integrate_test.sh ├── tools └── authserver │ └── server.go └── https └── pixiu └── api_config.yaml /.github/actions/actions-ding/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/.gitignore: -------------------------------------------------------------------------------- 1 | ./build/!Dockerfile 2 | -------------------------------------------------------------------------------- /.github/actions/actions-ding/.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /.github/actions/actions-ding/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /plugins/index.md: -------------------------------------------------------------------------------- 1 | ## Plugins 2 | 3 | * [rate limit](ratelimit/README.md) 4 | 5 | - [opa](opa/README.md) -------------------------------------------------------------------------------- /admin/sample.md: -------------------------------------------------------------------------------- 1 | please refer to https://www.yuque.com/docs/share/6e9de027-0548-45a1-a64c-d97529f5f5cc?# 《Pixiu Admin 》 -------------------------------------------------------------------------------- /dubbogo/simple/nacos_farconf/farconfnacos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/dubbo-go-pixiu-samples/HEAD/dubbogo/simple/nacos_farconf/farconfnacos.png -------------------------------------------------------------------------------- /mcp/README_zh.md: -------------------------------------------------------------------------------- 1 | # MCP 示例索引 2 | 3 | [English](./README.md) | 中文 4 | 5 | 本目录下包含两类 MCP 示例: 6 | 7 | - `simple/`:基础示例 8 | - `oauth/`:启用 MCP 授权(OAuth)示例,仅保护 `/mcp`,远程 JWKS 9 | - `nacos/`:使用 Nacos 作为 MCP Server 的注册中心和配置中心的示例 10 | 11 | 请进入各子目录阅读对应的 README 获取详细使用方法。 -------------------------------------------------------------------------------- /.github/actions/actions-ding/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule ".github/actions/actions-ding"] 2 | path = .github/actions/actions-ding 3 | url = https://github.com/zcong1993/actions-ding 4 | [submodule ".github/actions/review-dog"] 5 | path = .github/actions/review-dog 6 | url = https://github.com/reviewdog/action-golangci-lint 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement Request 3 | about: Suggest an enhancement 4 | labels: kind/feature 5 | 6 | --- 7 | 8 | 9 | **What would you like to be added**: 10 | 11 | **Why is this needed**: -------------------------------------------------------------------------------- /.github/actions/actions-ding/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": false, 9 | "arrowParens": "avoid", 10 | "parser": "typescript" 11 | } -------------------------------------------------------------------------------- /.github/actions/review-dog/testdata/main.go: -------------------------------------------------------------------------------- 1 | package testdata 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | func Main() { 9 | // langauge 10 | 11 | x := 2 12 | x += 1 13 | fmt.Sprintf("%d") 14 | 15 | os.Open("main1.go") 16 | } 17 | 18 | func unused1(unusedParam int) error { 19 | 20 | return nil 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | 3 | logs/ 4 | .idea 5 | .vscode 6 | .mvn/ 7 | 8 | # app 9 | dubbo-go-pixiu 10 | dubbo-go-pixiu.exe 11 | dubbgo_server.out 12 | .scannerwork 13 | /logs 14 | /.idea 15 | /.vscode 16 | log 17 | cache 18 | 19 | .DS_Store 20 | vendor/ 21 | 22 | coverage.txt 23 | 24 | *.iml 25 | 26 | *.exe 27 | #test 28 | 29 | target/ 30 | -------------------------------------------------------------------------------- /xds/filesystem-control-panel/server/go.mod: -------------------------------------------------------------------------------- 1 | module xdsserver 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/dubbo-go-pixiu/pixiu-api v0.1.6-0.20220427143451-c0a68bf5b29a 7 | github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f 8 | github.com/fsnotify/fsnotify v1.5.1 9 | google.golang.org/grpc v1.56.3 10 | google.golang.org/protobuf v1.30.0 11 | ) 12 | -------------------------------------------------------------------------------- /.github/actions/review-dog/.github/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | misspell: 7 | locale: US 8 | errcheck: 9 | check-type-assertions: false 10 | check-blank: false 11 | 12 | linters: 13 | enable-all: true 14 | 15 | issues: 16 | exclude-use-default: false 17 | max-same-issues: 0 18 | -------------------------------------------------------------------------------- /.github/actions/review-dog/.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "packageRules": [ 6 | { 7 | "updateTypes": ["minor"], 8 | "automerge": true, 9 | "labels": ["bump:minor"] 10 | }, 11 | { 12 | "updateTypes": ["patch", "pin", "digest"], 13 | "automerge": true, 14 | "labels": ["bump:patch"] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /xds/local-control-panel/server/app/go.mod: -------------------------------------------------------------------------------- 1 | module xdsserver 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221008085317-b71ac6ee18d6 7 | github.com/dubbo-go-pixiu/pixiu-api v0.1.6-0.20220612115254-d9a176b25b99 8 | github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f 9 | google.golang.org/grpc v1.56.3 10 | google.golang.org/protobuf v1.30.0 11 | ) 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Report a bug 4 | labels: kind/bug 5 | 6 | --- 7 | 8 | 11 | 12 | 13 | **What happened**: 14 | 15 | **What you expected to happen**: 16 | 17 | **How to reproduce it (as minimally and precisely as possible)**: 18 | 19 | **Anything else we need to know?**: 20 | -------------------------------------------------------------------------------- /mcp/README.md: -------------------------------------------------------------------------------- 1 | # MCP Samples Index 2 | 3 | [中文](./README_zh.md) | English 4 | 5 | This directory contains several MCP examples: 6 | 7 | - `simple/`: A basic example demonstrating MCP interaction. 8 | - `oauth/`: A security example showing how to protect the MCP endpoint with OAuth 2.0 and a remote JWKS. 9 | - `nacos/`: An integration example demonstrating how to use Nacos as the MCP Server for dynamic configuration. 10 | 11 | Please navigate to each subdirectory and read the corresponding README for detailed instructions. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /xds/filesystem-control-panel/pixiu/cds.json: -------------------------------------------------------------------------------- 1 | { 2 | "clusters": [ 3 | { 4 | "name": "http_bin", 5 | "typeStr": "http", 6 | "lbStr": "Rand", 7 | "endpoints": [ 8 | { 9 | "id": "backend3", 10 | "address": { 11 | "address": "127.0.0.1", 12 | "port": "8081" 13 | } 14 | }, 15 | { 16 | "id": "backend4", 17 | "address": { 18 | "address": "127.0.0.1", 19 | "port": "8082" 20 | } 21 | } 22 | ] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /.github/actions/actions-ding/action.yml: -------------------------------------------------------------------------------- 1 | name: 'DingDing Notify Action' 2 | description: 'Send dingding simple notify message' 3 | author: 'zcong1993' 4 | branding: 5 | icon: 'message-square' 6 | color: 'blue' 7 | inputs: 8 | dingToken: 9 | description: 'DingDing bot token' 10 | required: true 11 | body: 12 | description: 'Post Body to send' 13 | required: true 14 | secret: 15 | description: 'If use sign secret' 16 | required: false 17 | ignoreError: 18 | description: 'If set true, will not fail action when API call failed' 19 | required: false 20 | 21 | runs: 22 | using: 'node16' 23 | main: 'dist/index.js' 24 | -------------------------------------------------------------------------------- /xds/local-control-panel/readme.md: -------------------------------------------------------------------------------- 1 | ### xds 2 | 3 | xds implement demo how to use xds server. 4 | 5 | ### to run sample: 6 | 7 | 1. start xds server 8 | ``` 9 | dubbo-go-pixiu/samples/xds/local-control-panel/server/app> go run . 10 | ``` 11 | 12 | 2. run pixiu 13 | ``` 14 | dubbo-go-pixiu > pixiu gateway start -c ./samples/xds/local-control-panel/pixiu/conf.yaml -g test/configs/log.yml 15 | ``` 16 | 17 | 3. check result 18 | ```shell 19 | curl -v 'localhost:8888/get' 20 | 21 | ## will get result below 22 | { 23 | "args": {}, 24 | "headers": { 25 | "Accept": "*/*", 26 | "Accept-Encoding": "gzip", 27 | "Host": "httpbin.org", 28 | "User-Agent": "curl/7.64.1", 29 | "X-Amzn-Trace-Id": "Root=1-61ba16a5-3ea1961217b2ffa7124ea2c2" 30 | }, 31 | "origin": "223.104.41.209", 32 | "url": "http://httpbin.org/get" 33 | } 34 | ``` -------------------------------------------------------------------------------- /xds/filesystem-control-panel/readme.md: -------------------------------------------------------------------------------- 1 | ### xds 2 | 3 | xds implement demo how to use xds server. 4 | 5 | ### to run sample: 6 | 7 | 1. start xds server 8 | ```shell 9 | ./server/app> go run . 10 | ``` 11 | 12 | 2. run pixiu 13 | ```shell 14 | dubbo-go-pixiu > pixiu gateway start -c ./samples/xds/local-control-panel/pixiu/conf.yaml -g test/configs/log.yml 15 | ``` 16 | 17 | 3. check result 18 | ```shell 19 | curl -v 'localhost:8888/get' 20 | 21 | ## will get result below 22 | { 23 | "args": {}, 24 | "headers": { 25 | "Accept": "*/*", 26 | "Accept-Encoding": "gzip", 27 | "Host": "httpbin.org", 28 | "User-Agent": "curl/7.64.1", 29 | "X-Amzn-Trace-Id": "Root=1-61ba16a5-3ea1961217b2ffa7124ea2c2" 30 | }, 31 | "origin": "223.104.41.209", 32 | "url": "http://httpbin.org/get" 33 | } 34 | ``` 35 | 4. change pixiu config file & check result -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 3 | 4 | **What this PR does**: 5 | 6 | **Which issue(s) this PR fixes**: 7 | 12 | Fixes # 13 | 14 | **Special notes for your reviewer**: 15 | 16 | **Does this PR introduce a user-facing change?**: 17 | 22 | ```release-note 23 | 24 | ``` -------------------------------------------------------------------------------- /llm/nacos/.env.example: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | API_KEY = sk-****** -------------------------------------------------------------------------------- /llm/nacos/README_zh.md: -------------------------------------------------------------------------------- 1 | # **Dubbo-go-pixiu LLM 示例** 2 | 3 | ## 1. **简介** 4 | 5 | 本示例演示了如何使用 Nacos 作为注册中心,由 Dubbo-go-pixiu 进行服务发现调用。 6 | 7 | ## 2. **准备工作** 8 | 9 | 10 | 1. 将你的 DeepSeek API 添加到 `.env` 文件中,更多详情请参阅 [deepseek](https://platform.deepseek.com)。 11 | 12 | ```shell 13 | cp pathto/dubbo-go-pixiu-samples/llm/nacos/.env.example pathto/dubbo-go-pixiu-samples/llm/nacos/.env 14 | ``` 15 | 16 | 2. Docker Compose 17 | 服务注册代码和 Nacos 服务均通过 Docker Compose 启动。 18 | ```shell 19 | docker-compose up -d 20 | ``` 21 | 22 | ### **运行 Pixiu 服务器** 23 | 24 | 通过执行以下命令运行Pixiu服务器: 25 | 26 | ```shell 27 | cd pathto/dubbo-go-pixiu 28 | go run ./cmd/pixiu/*.go gateway start -c pathto/dubbo-go-pixiu-samples/llm/nacos/pixiu/conf.yaml 29 | ``` 30 | 31 | ### **运行客户端代码** 32 | 33 | ```shell 34 | cd pathto/dubbo-go-pixiu-samples/llm/nacos 35 | go run ./go-client/client.go 36 | ``` -------------------------------------------------------------------------------- /llm/bestpractise/.env.example: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | API_KEY = sk-****** -------------------------------------------------------------------------------- /llm/bestpractise/go-client/.env.example: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | API_KEY = sk-****** -------------------------------------------------------------------------------- /springcloud/nacos/server/auth-service/start.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | mvn spring-boot:run -------------------------------------------------------------------------------- /springcloud/nacos/server/user-service/start.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | mvn spring-boot:run -------------------------------------------------------------------------------- /springcloud/zookeeper/server/server-zk/start.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | mvn spring-boot:run -------------------------------------------------------------------------------- /springcloud/zookeeper/server/server-zk-alibaba/start.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | mvn spring-boot:run -------------------------------------------------------------------------------- /dubbogo/multi/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | var Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/body/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/mix/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/uri/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/jaeger/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/proxy/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/query/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | const Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/server/app/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | // Version dubbo version 21 | var Version = "2.7.5" 22 | -------------------------------------------------------------------------------- /springcloud/zookeeper/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | services: 21 | zookeeper: 22 | image: zookeeper 23 | ports: 24 | - "2181:2181" -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/build/DockerfilePixiu: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | FROM dubbogopixiu/dubbo-go-pixiu:v0.5.1-istio 21 | 22 | COPY ./conf.yaml /etc/pixiu/conf.yaml 23 | -------------------------------------------------------------------------------- /llm/nacos/README.md: -------------------------------------------------------------------------------- 1 | # **Dubbo-go-pixiu LLM Sample** 2 | 3 | ## 1. **Introduction** 4 | 5 | This sample demonstrates register service through nacos, and how to make a llm call using Dubbo-go-pixiu. 6 | 7 | ## 2. **Preparation** 8 | 9 | 1. Add your DeepSeek API to `.env` file, see [deepseek](https://platform.deepseek.com) for more details. 10 | 11 | ```shell 12 | cp pathto/dubbo-go-pixiu-samples/llm/nacos/.env.example pathto/dubbo-go-pixiu-samples/llm/nacos/.env 13 | ``` 14 | 15 | 2. Docker Compose 16 | Service registration code and nacos service are started through Docker Compose. 17 | ```shell 18 | docker-compose up -d 19 | ``` 20 | 21 | ### **Run the Pixiu Server** 22 | 23 | Run the Pixiu server by executing: 24 | 25 | ```shell 26 | cd pathto/dubbo-go-pixiu 27 | go run ./cmd/pixiu/*.go gateway start -c pathto/dubbo-go-pixiu-samples/llm/nacos/pixiu/conf.yaml 28 | ``` 29 | 30 | ### **Run the client code** 31 | 32 | ```shell 33 | cd pathto/dubbo-go-pixiu-samples/llm/nacos 34 | go run ./go-client/client.go 35 | ``` -------------------------------------------------------------------------------- /springcloud/nacos/server/auth-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | server.port=8074 21 | spring.application.name=auth-service 22 | spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 -------------------------------------------------------------------------------- /springcloud/nacos/server/user-service/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | server.port=8071 21 | spring.application.name=user-service 22 | spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 -------------------------------------------------------------------------------- /dubbogo/simple/direct/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure -------------------------------------------------------------------------------- /dubbohttpproxy/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/body/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/mix/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/proxy/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/query/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/uri/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbotripleproxy/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/resolve/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /plugins/opa/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | -------------------------------------------------------------------------------- /llm/bestpractise/README_zh.md: -------------------------------------------------------------------------------- 1 | # **Dubbo-go-pixiu LLM 示例** 2 | 3 | ## 1. **简介** 4 | 5 | 本示例演示了如何使用 Dubbo-go-pixiu 进行 LLM 调用,并使用 Prometheus 和 Grafana 进行数据观测。 6 | 7 | ## 2. **准备工作** 8 | 9 | 10 | 1. 将你的 DeepSeek API 添加到 `.env` 文件中,更多详情请参阅 [deepseek](https://platform.deepseek.com)。 11 | 12 | ```shell 13 | cp pathto/dubbo-go-pixiu-samples/llm/bestpractise/test/.env.example pathto/dubbo-go-pixiu-samples/llm/bestpractise/test/.env 14 | ``` 15 | 2. 根据真实情况修改 prometheus.yml 文件中的 IP 地址。 16 | 17 | 3. Docker Compose 18 | ```shell 19 | docker-compose up -d 20 | ``` 21 | 22 | ### **运行 Pixiu 服务器** 23 | 24 | 通过执行以下命令运行Pixiu服务器: 25 | 26 | ```shell 27 | cd pathto/dubbo-go-pixiu 28 | go run ./cmd/pixiu/*.go gateway start -c pathto/dubbo-go-pixiu-samples/llm/bestpractise/pixiu/conf.yaml 29 | ``` 30 | 31 | ### **运行客户端代码** 32 | 33 | ```shell 34 | cd pathto/dubbo-go-pixiu-samples/llm/bestpractise 35 | go run ./go-client/client.go 36 | ``` 37 | 38 | ### **查看 Grafana 仪表盘** 39 | 40 | 打开浏览器,访问 `http://localhost:3000`,使用默认用户名和密码 `admin` 登录。登录后,上传 `grafana.json` 作为仪表盘,将数据源设置为 Prometheus,监控 LLM 调用的相关指标。 -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/build/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | FROM alpine:3.15 21 | 22 | WORKDIR /dubbogo 23 | 24 | ENV DUBBO_GO_CONFIG_PATH=/dubbogo/dubbogo.yaml 25 | 26 | COPY ./app /dubbogo/app 27 | COPY ./dubbogo.yaml /dubbogo/dubbogo.yaml 28 | 29 | CMD /dubbogo/app 30 | -------------------------------------------------------------------------------- /llm/bestpractise/prometheus.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | global: 17 | evaluation_interval: 15s 18 | scrape_interval: 15s 19 | scrape_configs: 20 | - job_name: dubbo-provider 21 | scrape_interval: 15s 22 | scrape_timeout: 5s 23 | metrics_path: / 24 | static_configs: 25 | - targets: ['127.0.0.1:2222'] -------------------------------------------------------------------------------- /dubbogo/simple/triple/docker/docker-health-check.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | curl http://127.0.0.1:8848/nacos/v1/console/health/liveness 19 | res=$? 20 | passCode=0 21 | while [ "$res" != "$passCode" ];do 22 | sleep 5 23 | curl http://127.0.0.1:8848/nacos/v1/console/health/liveness 24 | res=$? 25 | done -------------------------------------------------------------------------------- /dubbogo/simple/nacos/docker/docker-health-check.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | curl http://127.0.0.1:8848/nacos/v1/console/health/liveness 19 | res=$? 20 | passCode=0 21 | while [ "$res" != "$passCode" ];do 22 | sleep 5 23 | curl http://127.0.0.1:8848/nacos/v1/console/health/liveness 24 | res=$? 25 | done 26 | -------------------------------------------------------------------------------- /.github/actions/actions-ding/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 5 | "outDir": "./lib", /* Redirect output structure to the directory. */ 6 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 7 | "strict": true, /* Enable all strict type-checking options. */ 8 | "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 9 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 10 | }, 11 | "exclude": ["node_modules", "**/*.test.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos_farconf/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | config-center: 20 | type: nacos 21 | enable: true 22 | nacos: 23 | server_configs: 24 | - ip_addr: "127.0.0.1" 25 | port: 8848 26 | client-config: 27 | username: nacos 28 | password: admin 29 | data-id: dubbo-go-pixiu 30 | group: DEFAULT_GROUP -------------------------------------------------------------------------------- /xds/filesystem-control-panel/pixiu/lds.json: -------------------------------------------------------------------------------- 1 | { 2 | "listeners": [ 3 | { 4 | "name": "net/http", 5 | "protocol": "HTTP2", 6 | "address": { 7 | "socketAddress": { 8 | "address": "0.0.0.0", 9 | "port": "8888" 10 | } 11 | }, 12 | "filterChain": { 13 | "filters": [ 14 | { 15 | "name": "dgp.filter.httpconnectionmanager", 16 | "struct": { 17 | "http_filters": [ 18 | { 19 | "config": null, 20 | "name": "dgp.filter.http.httpproxy" 21 | } 22 | ], 23 | "route_config": { 24 | "routes": [ 25 | { 26 | "match": { 27 | "prefix": "/" 28 | }, 29 | "route": { 30 | "cluster": "http_bin", 31 | "cluster_not_found_response_code": 503 32 | } 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ] 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /.github/actions/review-dog/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 haya14busa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /llm/nacos/registry/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/dubbo-go-pixiu/samples/llm/nacos 2 | 3 | go 1.23.8 4 | 5 | require ( 6 | github.com/dubbogo/gost v1.14.1 7 | github.com/nacos-group/nacos-sdk-go v1.1.6 8 | ) 9 | 10 | require ( 11 | github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect 12 | github.com/buger/jsonparser v1.1.1 // indirect 13 | github.com/go-errors/errors v1.0.1 // indirect 14 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect 15 | github.com/json-iterator/go v1.1.12 // indirect 16 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 17 | github.com/modern-go/reflect2 v1.0.2 // indirect 18 | github.com/natefinch/lumberjack v2.0.0+incompatible // indirect 19 | github.com/pkg/errors v0.9.1 // indirect 20 | github.com/sirupsen/logrus v1.7.0 // indirect 21 | go.uber.org/atomic v1.9.0 // indirect 22 | go.uber.org/multierr v1.6.0 // indirect 23 | go.uber.org/zap v1.21.0 // indirect 24 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect 25 | golang.org/x/sys v0.7.0 // indirect 26 | gopkg.in/ini.v1 v1.66.2 // indirect 27 | gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect 28 | ) 29 | -------------------------------------------------------------------------------- /springcloud/nacos/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | nacos: 24 | image: nacos/nacos-server:latest 25 | container_name: nacos-standalone 26 | environment: 27 | - PREFER_HOST_MODE=hostname 28 | - MODE=standalone 29 | ports: 30 | - "8848:8848" 31 | - "9848:9848" -------------------------------------------------------------------------------- /.github/actions/actions-ding/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2018 GitHub, Inc. and contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | nacos: 24 | image: nacos/nacos-server:v2.3.0 25 | container_name: nacos-standalone 26 | environment: 27 | - PREFER_HOST_MODE=hostname 28 | - MODE=standalone 29 | ports: 30 | - "8848:8848" 31 | - "9848:9848" 32 | -------------------------------------------------------------------------------- /llm/nacos/registry/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | FROM golang:1.23-alpine AS builder 19 | 20 | WORKDIR /app 21 | 22 | COPY registry/go.mod registry/go.sum ./ 23 | RUN go mod download 24 | 25 | COPY registry/ . 26 | 27 | RUN CGO_ENABLED=0 go build -o /app/provider . 28 | 29 | FROM alpine:3.22.1 30 | 31 | WORKDIR /app 32 | 33 | COPY --from=builder /app/provider . 34 | 35 | CMD ["./provider"] -------------------------------------------------------------------------------- /springcloud/zookeeper/server/server-zk/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | server: 21 | port: 0 22 | spring: 23 | # cloud: 24 | # zookeeper: 25 | # connect-string: localhost:2181 26 | application: 27 | name: pixiu-springcloud-server 28 | 29 | logging.level: 30 | org.apache.zookeeper.ClientCnxn: ERROR 31 | 32 | #spring.cloud.zookeeper.dependencies: 33 | # - testZookeeperApp: ~ -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/cmd/app.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | _ "dubbo-go-app/pkg/service" 22 | 23 | "dubbo.apache.org/dubbo-go/v3/config" 24 | _ "dubbo.apache.org/dubbo-go/v3/imports" 25 | ) 26 | 27 | // export DUBBO_GO_CONFIG_PATH=$PATH_TO_APP/conf/dubbogo.yaml 28 | func main() { 29 | if err := config.Load(); err != nil { 30 | panic(err) 31 | } 32 | select {} 33 | } 34 | -------------------------------------------------------------------------------- /.licenserc.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | header: 18 | license: 19 | spdx-id: Apache-2.0 20 | copyright-owner: Apache Software Foundation 21 | paths-ignore: 22 | - '.github' 23 | - '.gitignore' 24 | - '.gitmodules' 25 | - 'LICENSE' 26 | - '**/*.md' 27 | - '**/*.mod' 28 | - '**/*.sum' 29 | - '**/*.json' 30 | 31 | comment: on-failure 32 | 33 | dependency: 34 | files: 35 | - go.mod -------------------------------------------------------------------------------- /springcloud/zookeeper/server/server-zk-alibaba/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | server: 21 | port: 0 22 | spring: 23 | # cloud: 24 | # zookeeper: 25 | # connect-string: localhost:2181 26 | application: 27 | name: pixiu-springcloud-server 28 | 29 | logging.level: 30 | org.apache.zookeeper.ClientCnxn: ERROR 31 | 32 | #spring.cloud.zookeeper.dependencies: 33 | # - testZookeeperApp: ~ -------------------------------------------------------------------------------- /dubbogo/simple/uri/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8885" 20 | 21 | API1=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/user/name/tc") 22 | API2=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/user/code/1") 23 | API3=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/user/name/tc/age/99") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | done 31 | -------------------------------------------------------------------------------- /.github/auto-comment.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # Comment to a new issue. 20 | issueOpened: > 21 | Thank your for raising a issue. We will try and get back to you as soon as possible. 22 | Please make sure you have given us as much context as possible. 23 | pullRequestOpened: > 24 | Thank your for raising your pull request. 25 | Please make sure you have followed our contributing guidelines. We will review it as soon as possible 26 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/readme.md: -------------------------------------------------------------------------------- 1 | # Traffic Filter quick start 2 | 3 | ## Canary Distribution 4 | 5 | ### Start Http Server 6 | 7 | ```shell 8 | cd server 9 | go run server.go 10 | ``` 11 | 12 | ```shell 13 | cd server/v1 14 | go run server.go 15 | ``` 16 | 17 | ```shell 18 | cd server/v2 19 | go run server.go 20 | ``` 21 | 22 | ### Start Pixiu 23 | 24 | ```shell 25 | go run cmd/pixiu/*.go gateway start -c samples/dubbogo/simple/traffic/pixiu/canary-conf.yaml 26 | ``` 27 | 28 | ### Start test 29 | 30 | ```shell 31 | curl http://localhost:8888/user 32 | curl -H "canary-by-header: v1" http://localhost:8888/user 33 | ``` 34 | 35 | ## Header Route 36 | 37 | ### Start Http Server 38 | 39 | ```shell 40 | cd server/v1 41 | go run server.go 42 | ``` 43 | 44 | ```shell 45 | cd server/v2 46 | go run server.go 47 | ``` 48 | 49 | ```shell 50 | cd server/v3 51 | go run server.go 52 | ``` 53 | 54 | ### Start Pixiu 55 | 56 | ```shell 57 | go run cmd/pixiu/*.go gateway start -c samples/dubbogo/simple/traffic/pixiu/header-conf.yaml 58 | ``` 59 | 60 | ### Start test 61 | 62 | ```shell 63 | curl http://localhost:8888/user 64 | curl -H "X-C: t1" http://localhost:8888 65 | curl -H "REG: tt" http://localhost:8888 66 | curl -H "X-A: t1" http://localhost:8888/user 67 | ``` 68 | -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/conf/dubbogo.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | dubbo: 20 | registries: 21 | "demoZK": 22 | protocol: "zookeeper" 23 | timeout: "3s" 24 | address: "127.0.0.1:2181" 25 | consumer: 26 | registryIDs: 27 | - demoZK 28 | references: 29 | "UserProvider": 30 | protocol: "dubbo" 31 | interface: "com.dubbogo.pixiu.UserService" 32 | logger: 33 | zap-config: 34 | level: info -------------------------------------------------------------------------------- /dubbogo/simple/query/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8884" 20 | 21 | API1=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByName?name=tc") 22 | API2=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByCode?code=1") 23 | API3=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByNameAndAge?name=tc&age=99") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | done 31 | -------------------------------------------------------------------------------- /llm/bestpractise/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | services: 17 | grafana: 18 | image: grafana/grafana-enterprise 19 | container_name: grafana 20 | restart: unless-stopped 21 | ports: 22 | - "3000:3000" 23 | 24 | prometheus: 25 | image: prom/prometheus 26 | container_name: prometheus 27 | restart: unless-stopped 28 | ports: 29 | - "9090:9090" 30 | volumes: 31 | - ./prometheus.yml:/etc/prometheus/prometheus.yml 32 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/chart/app/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | {{- if .Values.serviceAccount.create -}} 21 | apiVersion: v1 22 | kind: ServiceAccount 23 | metadata: 24 | name: {{ include "app.serviceAccountName" . }} 25 | labels: 26 | {{- include "app.labels" . | nindent 4 }} 27 | {{- with .Values.serviceAccount.annotations }} 28 | annotations: 29 | {{- toYaml . | nindent 4 }} 30 | {{- end }} 31 | {{- end }} 32 | -------------------------------------------------------------------------------- /.github/actions/actions-ding/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "actions-ding", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "Send dingding simple notify message", 6 | "scripts": { 7 | "build": "tsc", 8 | "format": "prettier --write **/*.ts", 9 | "format-check": "prettier --check **/*.ts", 10 | "lint": "eslint src/**/*.ts", 11 | "pack": "ncc build src/index.ts -o dist", 12 | "test": "jest", 13 | "all": "npm run build && npm run format && npm run lint && npm run pack && npm test" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/zcong1993/actions-ding" 18 | }, 19 | "keywords": [ 20 | "actions", 21 | "node", 22 | "setup" 23 | ], 24 | "author": "zcong1993", 25 | "license": "MIT", 26 | "dependencies": { 27 | "@actions/core": "^1.2.4", 28 | "@zcong/ding-bot": "^0.1.1" 29 | }, 30 | "devDependencies": { 31 | "@types/jest": "^26.0.0", 32 | "@types/node": "^14.0.13", 33 | "@typescript-eslint/parser": "^3.3.0", 34 | "@zeit/ncc": "^0.22.3", 35 | "eslint": "^7.2.0", 36 | "eslint-plugin-github": "^4.0.1", 37 | "eslint-plugin-jest": "^23.13.2", 38 | "jest": "^26.0.1", 39 | "prettier": "^2.0.5", 40 | "typescript": "^3.9.5" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.github/actions/review-dog/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit 1 4 | 5 | TEMP_PATH="$(mktemp -d)" 6 | PATH="${TEMP_PATH}:$PATH" 7 | 8 | echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog' 9 | curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" "${REVIEWDOG_VERSION}" 2>&1 10 | echo '::endgroup::' 11 | 12 | echo '::group:: Installing golangci-lint ... https://github.com/golangci/golangci-lint' 13 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${TEMP_PATH}" "${GOLANGCI_LINT_VERSION}" 2>&1 14 | echo '::endgroup::' 15 | 16 | export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" 17 | 18 | echo '::group:: Running golangci-lint with reviewdog 🐶 ...' 19 | # shellcheck disable=SC2086 20 | golangci-lint run --out-format line-number ${INPUT_GOLANGCI_LINT_FLAGS} \ 21 | | reviewdog -f=golangci-lint \ 22 | -name="${INPUT_TOOL_NAME}" \ 23 | -reporter="${INPUT_REPORTER:-github-pr-check}" \ 24 | -filter-mode="${INPUT_FILTER_MODE:-added}" \ 25 | -fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \ 26 | -level="${INPUT_LEVEL}" \ 27 | ${INPUT_REVIEWDOG_FLAGS} 28 | echo '::endgroup::' 29 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/chart/pixiu-gateway/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | {{- if .Values.serviceAccount.create -}} 21 | apiVersion: v1 22 | kind: ServiceAccount 23 | metadata: 24 | name: {{ include "app.serviceAccountName" . }} 25 | labels: 26 | {{- include "app.labels" . | nindent 4 }} 27 | {{- with .Values.serviceAccount.annotations }} 28 | annotations: 29 | {{- toYaml . | nindent 4 }} 30 | {{- end }} 31 | {{- end }} 32 | -------------------------------------------------------------------------------- /llm/nacos/test/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | curl -X POST "http://localhost:8888/chat/completions" \ 21 | -H "Content-Type: application/json" \ 22 | -H "Authorization: Bearer $OPENAI_API_KEY" \ 23 | -d '{ 24 | "model": "deepseek-chat", 25 | "messages": [ 26 | {"role": "system", "content": "You are a helpful assistant."}, 27 | {"role": "user", "content": "Hello!"} 28 | ], 29 | "stream": true 30 | }' -------------------------------------------------------------------------------- /grpc/simple/README_CN.md: -------------------------------------------------------------------------------- 1 | # gRPC 简单示例 2 | 3 | [English](./README.md) 4 | 5 | 本示例演示了如何使用 Apache Dubbo-go-pixiu 作为标准 gRPC 服务的网关,支持一元调用、客户端流、服务端流和双向流通信。 6 | 7 | 示例包括: 8 | - 一个实现了 RouteGuide 服务的 gRPC 服务器。 9 | - 一个用于 RouteGuide 服务的 gRPC 客户端。 10 | - 一个 Pixiu 配置文件,用于将请求代理到 gRPC 服务器。 11 | 12 | ## 如何运行 13 | 14 | 您将需要三个独立的终端窗口。 15 | 16 | ### 1. 启动 gRPC 服务器 17 | 18 | 在第一个终端中,进入示例目录并启动 gRPC 服务器。 19 | 20 | ```sh 21 | # 终端 1 22 | cd dubbo-go-pixiu-samples/grpc/simple 23 | go run server/server.go 24 | ``` 25 | 26 | 服务器将启动并监听 `localhost:50051`。 27 | 28 | ### 2. 启动 Pixiu 网关 29 | 30 | 在第二个终端中,进入示例目录并启动 Pixiu 网关。 31 | 32 | ```sh 33 | # 终端 2 34 | cd dubbo-go-pixiu-samples 35 | go run pixiu/*.go gateway start -c grpc/simple/pixiu/conf.yaml 36 | ``` 37 | 38 | Pixiu 将启动并监听 `localhost:8881` 上的 gRPC 请求。 39 | 40 | ### 3. 运行 gRPC 客户端 41 | 42 | 在第三个终端中,返回到示例目录并运行客户端。 43 | 44 | ```sh 45 | # 终端 3 46 | cd dubbo-go-pixiu-samples/grpc/simple 47 | go run client/client.go 48 | ``` 49 | 50 | 客户端将向 `localhost:8881` (Pixiu) 发送请求,然后 Pixiu 将这些请求代理到 gRPC 服务器。您应该能看到客户端与服务器交互并打印出功能信息。 51 | 52 | ## 运行测试 53 | 54 | 在运行测试前,请确保 gRPC 服务器和 Pixiu 网关已按照“如何运行”部分的指引启动。 55 | 56 | 打开一个新的终端,在项目根目录 (`dubbo-go-pixiu-samples`) 下执行以下命令来运行集成测试: 57 | 58 | ```sh 59 | go test -v ./grpc/simple/test/ 60 | ``` 61 | 62 | 您将会看到所有子测试(一元调用、服务端流、客户端流和双向流)的成功执行日志。 -------------------------------------------------------------------------------- /llm/bestpractise/test/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | curl -X POST "http://localhost:8888/chat/completions" \ 21 | -H "Content-Type: application/json" \ 22 | -H "Authorization: Bearer $OPENAI_API_KEY" \ 23 | -d '{ 24 | "model": "deepseek-chat", 25 | "messages": [ 26 | {"role": "system", "content": "You are a helpful assistant."}, 27 | {"role": "user", "content": "Hello!"} 28 | ], 29 | "stream": true 30 | }' -------------------------------------------------------------------------------- /dubbogo/simple/triple/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | nacos: 24 | image: nacos/nacos-server:v2.3.0 25 | container_name: nacos-standalone 26 | environment: 27 | - PREFER_HOST_MODE=hostname 28 | - MODE=standalone 29 | ports: 30 | - "8848:8848" 31 | - "9848:9848" 32 | healthcheck: 33 | test: "curl --fail http://127.0.0.1:8848/nacos/v1/console/health/liveness || exit 1" 34 | interval: 1s 35 | -------------------------------------------------------------------------------- /.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # 19 | 20 | notifications: 21 | commits: commits@dubbo.apache.org 22 | issues: notifications@dubbo.apache.org 23 | pullrequests: notifications@dubbo.apache.org 24 | jira_options: link label link label 25 | 26 | github: 27 | homepage: https://dubbo.apache.org/ 28 | features: 29 | # Enable wiki for documentation 30 | wiki: true 31 | # Enable issue management 32 | issues: true 33 | # Enable projects for project management boards 34 | projects: true 35 | -------------------------------------------------------------------------------- /llm/bestpractise/README.md: -------------------------------------------------------------------------------- 1 | # **Dubbo-go-pixiu LLM Sample** 2 | 3 | ## 1. **Introduction** 4 | 5 | This sample demonstrates how to make a llm call using Dubbo-go-pixiu, and use prometheus and grafana to discover metrics. 6 | 7 | ## 2. **Preparation** 8 | 9 | 1. Add your DeepSeek API to `.env` file, see [deepseek](https://platform.deepseek.com) for more details. 10 | 11 | ```shell 12 | cp pathto/dubbo-go-pixiu-samples/llm/bestpractise/test/.env.example pathto/dubbo-go-pixiu-samples/llm/bestpractise/test/.env 13 | ``` 14 | 15 | 2. Edit the `prometheus.yml` file to set the correct IP address. 16 | 17 | 3. Docker Compose 18 | ```shell 19 | docker-compose up -d 20 | ``` 21 | 22 | ### **Run the Pixiu Server** 23 | 24 | Run the Pixiu server by executing: 25 | 26 | ```shell 27 | cd pathto/dubbo-go-pixiu 28 | go run ./cmd/pixiu/*.go gateway start -c pathto/dubbo-go-pixiu-samples/llm/bestpractise/pixiu/conf.yaml 29 | ``` 30 | 31 | ### **Run the client code** 32 | 33 | ```shell 34 | cd pathto/dubbo-go-pixiu-samples/llm/bestpractise 35 | go run ./go-client/client.go 36 | ``` 37 | 38 | ### **View Grafana Dashboard** 39 | 40 | Open your browser and go to `http://localhost:3000`, log in with the default username and password `admin`. After logging in, upload `grafana.json` as a dashboard, set the data source to Prometheus, and monitor the relevant metrics of LLM calls. -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/chart/app/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | apiVersion: v1 21 | kind: Service 22 | metadata: 23 | name: {{ include "app.fullname" . }} 24 | labels: 25 | {{- include "app.labels" . | nindent 4 }} 26 | spec: 27 | type: {{ .Values.service.type }} 28 | ports: 29 | - port: {{ .Values.service.port }} 30 | targetPort: {{ .Values.service.portName }} 31 | protocol: TCP 32 | name: {{ .Values.service.portName }} 33 | selector: 34 | {{- include "app.selectorLabels" . | nindent 4 }} 35 | 36 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/chart/nacos_env/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | apiVersion: v1 21 | kind: Service 22 | metadata: 23 | name: {{ include "app.fullname" . }} 24 | labels: 25 | {{- include "app.labels" . | nindent 4 }} 26 | spec: 27 | type: {{ .Values.service.type }} 28 | ports: 29 | - port: {{ .Values.service.port }} 30 | targetPort: {{ .Values.service.portName }} 31 | protocol: TCP 32 | name: {{ .Values.service.portName }} 33 | selector: 34 | {{- include "app.selectorLabels" . | nindent 4 }} 35 | 36 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos_farconf/README_zh.md: -------------------------------------------------------------------------------- 1 | # **Dubbo-go-pixiu Nacos 远端配置中心示例** 2 | 3 | ## 简介 4 | 5 | 本示例演示了使用 Nacos 作为 dubbo-go-pixiu 的远端配置中心的使用示例。 6 | 7 | 远端配置中心使用 Nacos,其结构图如: 8 | 9 | ![farconfnacos.png](farconfnacos.png) 10 | 11 | ## 案例运行步骤: 12 | 13 | 1. 在 docker 中启动 Nacos 14 | ```bash 15 | cd pathto/dubbo-go-pixiu-samples/dubbogo/simple/farconfnacos/docker 16 | docker-compose up 17 | ``` 18 | 2. 配置Nacos作为远端配置中心 19 | - 在浏览器中访问```http://172.22.142.171:8848/nacos/```, 初始化登陆密码并登入 20 | - 修改 `dubbogo/simple/farconfnacos/pixiu/conf.yaml` 文件中的 `client-config` 部分,确保其内容与您刚才初始化的账号密码一致 21 | ```yaml 22 | client-config: 23 | username: {your_username} 24 | password: {your_password} 25 | ``` 26 | - 点击 配置管理>配置列表>创建配置 来创建新配置,`Data ID` 为 `dubbo-go-pixiu`,`Group` 为 `DEFAULT_GROUP`。将`dubbogo/simple/farconfnacos/nacos/nacos.yaml`中的内容复制到配置内容对话框,点击发布 27 | 28 | 3. 设置命令行参数,启动 dubbo-go-pixiu 29 | 30 | ```bash 31 | cd pathto/dubbo-go-pixiu 32 | go run cmd/pixiu/*.go gateway start -c pathto/dubbo-go-pixiu-samples/dubbogo/simple/farconfnacos/pixiu/conf.yaml 33 | ``` 34 | 35 | 查看控制台输出,若看到如下日志,表示远端配置已成功加载,可以看出`idle_timeout``read_timeout``write_timeout`分别为我们在配置文件中设定的值: 36 | 37 | ``` 38 | 2025-05-28T11:39:22.982+0800 INFO config/config_load.go:137 http config:map[idle_timeout:4s read_timeout:5s write_timeout:6s] true 39 | ``` 40 | -------------------------------------------------------------------------------- /http/simple/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8888" 20 | 21 | API1=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/user/" -d '{"id":"0003","code":3,"name":"dubbogo","age":99}' --header 'Content-Type: application/json') 22 | API2=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/query-user/tc" --header "Content-Type: application/json") 23 | 24 | ARRAY_API=(${API1} ${API2}) 25 | 26 | for element in ${ARRAY_API[@]} 27 | do 28 | echo ${element} 29 | #QUERY=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByName?name=dubbogo") 30 | #echo ${QUERY} 31 | done -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/chart/pixiu-gateway/templates/service.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | apiVersion: v1 21 | kind: Service 22 | metadata: 23 | name: {{ include "app.fullname" . }} 24 | labels: 25 | {{- include "app.labels" . | nindent 4 }} 26 | spec: 27 | type: {{ .Values.service.type }} 28 | ports: 29 | - port: {{ .Values.service.port }} 30 | targetPort: {{ .Values.service.portName }} 31 | protocol: TCP 32 | name: {{ .Values.service.portName }} 33 | selector: 34 | {{- include "app.selectorLabels" . | nindent 4 }} 35 | 36 | -------------------------------------------------------------------------------- /dubbogo/simple/jaeger/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | zookeeper: 24 | image: zookeeper 25 | ports: 26 | - 2181:2181 27 | restart: on-failure 28 | 29 | jaeger: 30 | image: jaegertracing/all-in-one:1.26 31 | environment: 32 | - SPAN_STORAGE_TYPE=memory 33 | ports: 34 | - 5775:5775/udp 35 | - 6831:6831/udp 36 | - 6832:6832/udp 37 | - 5778:5778 38 | - 16685:16685 39 | - 16686:16686 40 | - 14268:14268 41 | - 14250:14250 42 | -------------------------------------------------------------------------------- /dubbogo/simple/mix/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8882" 20 | 21 | API1=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/user/tc?age=99") 22 | API2=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user/tc" -d '{"id":"0001","code":1,"name":"tc","age":66}' --header "Content-Type: application/json") 23 | API3=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user?name=tc" -d '{"id":"0001","code":1,"name":"tc","age":55}' --header "Content-Type: application/json") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | done -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="127.0.0.1:8881" 20 | 21 | API1=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/user/tc?age=99") 22 | API2=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user/tc" -d '{"id":"0001","code":1,"name":"tc","age":66}' --header "Content-Type: application/json") 23 | API3=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user?name=tc" -d '{"id":"0001","code":1,"name":"tc","age":55}' --header "Content-Type: application/json") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | done -------------------------------------------------------------------------------- /dubbogo/simple/proxy/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/query/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/uri/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbohttpproxy/server/dubbo/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/body/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | registries: 24 | zk: 25 | protocol: zookeeper 26 | timeout: 3s 27 | address: 127.0.0.1:2181 28 | protocols: 29 | dubbo: 30 | name: dubbo 31 | port: 20000 32 | provider: 33 | registry-ids: zk 34 | services: 35 | UserProvider: 36 | group: test 37 | serialization: hessian2 38 | interface: com.dubbogo.pixiu.UserService 39 | version: 1.0.0 40 | cluster: test_dubbo -------------------------------------------------------------------------------- /dubbogo/simple/direct/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/resolve/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | registries: 23 | zk: 24 | protocol: zookeeper 25 | timeout: 3s 26 | address: 127.0.0.1:2181 27 | protocols: 28 | dubbo: 29 | name: dubbo 30 | port: 20000 31 | provider: 32 | registry-ids: zk 33 | services: 34 | UserProvider: 35 | group: test 36 | version: 1.0.0 37 | cluster: test_dubbo 38 | serialization: hessian2 39 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/mix/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | registries: 24 | zk: 25 | protocol: zookeeper 26 | timeout: 3s 27 | address: 127.0.0.1:2181 28 | protocols: 29 | dubbo: 30 | name: dubbo 31 | port: 20000 32 | provider: 33 | registry-ids: zk 34 | services: 35 | UserProvider: 36 | group: test 37 | version: 1.0.0 38 | cluster: test_dubbo 39 | serialization: hessian2 40 | interface: com.dubbogo.pixiu.UserService 41 | -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | registries: 24 | zk: 25 | protocol: zookeeper 26 | timeout: 3s 27 | address: 127.0.0.1:2181 28 | protocols: 29 | dubbo: 30 | name: dubbo 31 | port: 20000 32 | provider: 33 | registry-ids: zk 34 | services: 35 | UserProvider: 36 | group: test 37 | version: 1.0.0 38 | cluster: test_dubbo 39 | serialization: hessian2 40 | interface: com.dubbogo.pixiu.UserService 41 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos_farconf/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to Apache Software Foundation (ASF) under one or more contributor 3 | # license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright 5 | # ownership. Apache Software Foundation (ASF) licenses this file to you under 6 | # the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | version: '3' 21 | 22 | services: 23 | nacos: 24 | image: nacos/nacos-server:v2.5.1 25 | container_name: nacos-standalone 26 | environment: 27 | - PREFER_HOST_MODE=hostname 28 | - MODE=standalone 29 | # - NACOS_AUTH_ENABLE=false 30 | - NACOS_AUTH_ENABLE=true 31 | - NACOS_AUTH_TOKEN=DboQPxIongllAOHCyap9JiuJQ0sqHgh+31QQe4+17cM= 32 | - NACOS_AUTH_IDENTITY_KEY=admin 33 | - NACOS_AUTH_IDENTITY_VALUE=admin 34 | ports: 35 | - "8848:8848" 36 | - "9848:9848" 37 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/server/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "fmt" 22 | "log" 23 | "net/http" 24 | "strings" 25 | ) 26 | 27 | func main() { 28 | routers := []string{"/user", "/user/pixiu", "/prefix", "/health"} 29 | 30 | for _, router := range routers { 31 | msg := router[strings.LastIndex(router, "/")+1:] 32 | http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) { 33 | fmt.Fprintf(w, `{"message":"%s","status":200}`, msg) 34 | }) 35 | } 36 | 37 | log.Println("Starting sample server ...") 38 | log.Fatal(http.ListenAndServe(":1314", nil)) 39 | } 40 | -------------------------------------------------------------------------------- /shutdown/triple/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "net/http" 22 | "time" 23 | ) 24 | 25 | import ( 26 | "github.com/apache/dubbo-go-pixiu/pkg/common/constant" 27 | ) 28 | 29 | func main() { 30 | http.HandleFunc("/com.dubbogo.pixiu.TripleUserService/TestByTriple", testFunc) 31 | http.ListenAndServe("127.0.0.1:20001", nil) 32 | } 33 | 34 | func testFunc(w http.ResponseWriter, r *http.Request) { 35 | time.Sleep(3 * time.Second) 36 | w.Header().Set(constant.HeaderKeyContextType, constant.HeaderValueJsonUtf8) 37 | w.Write([]byte("{\"message\":\"receive\"}")) 38 | } 39 | -------------------------------------------------------------------------------- /shutdown/http/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | "net/http" 23 | "time" 24 | ) 25 | 26 | import ( 27 | "github.com/apache/dubbo-go-pixiu/pkg/common/constant" 28 | ) 29 | 30 | func main() { 31 | http.HandleFunc("/user/", testFunc) 32 | log.Println("Starting sample server ...") 33 | log.Fatal(http.ListenAndServe(":1314", nil)) 34 | } 35 | 36 | func testFunc(w http.ResponseWriter, r *http.Request) { 37 | time.Sleep(3 * time.Second) 38 | w.Header().Set(constant.HeaderKeyContextType, constant.HeaderValueJsonUtf8) 39 | w.Write([]byte("{\"message\":\"receive\"}")) 40 | } 41 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/server/v1/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "fmt" 22 | "log" 23 | "net/http" 24 | "strings" 25 | ) 26 | 27 | func main() { 28 | routers := []string{"/user", "/user/pixiu", "/prefix", "/health"} 29 | 30 | for _, router := range routers { 31 | msg := router[strings.LastIndex(router, "/")+1:] 32 | http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) { 33 | fmt.Fprintf(w, `{"server": "v1","message":"%s","status":200}`, msg) 34 | }) 35 | } 36 | 37 | log.Println("Starting sample server ...") 38 | log.Fatal(http.ListenAndServe(":1315", nil)) 39 | } 40 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/server/v2/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "fmt" 22 | "log" 23 | "net/http" 24 | "strings" 25 | ) 26 | 27 | func main() { 28 | routers := []string{"/user", "/user/pixiu", "/prefix", "/health"} 29 | 30 | for _, router := range routers { 31 | msg := router[strings.LastIndex(router, "/")+1:] 32 | http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) { 33 | fmt.Fprintf(w, `{"server": "v2","message":"%s","status":200}`, msg) 34 | }) 35 | } 36 | 37 | log.Println("Starting sample server ...") 38 | log.Fatal(http.ListenAndServe(":1316", nil)) 39 | } 40 | -------------------------------------------------------------------------------- /dubbogo/simple/traffic/server/v3/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "fmt" 22 | "log" 23 | "net/http" 24 | "strings" 25 | ) 26 | 27 | func main() { 28 | routers := []string{"/user", "/user/pixiu", "/prefix", "/health"} 29 | 30 | for _, router := range routers { 31 | msg := router[strings.LastIndex(router, "/")+1:] 32 | http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) { 33 | fmt.Fprintf(w, `{"server": "v3","message":"%s","status":200}`, msg) 34 | }) 35 | } 36 | 37 | log.Println("Starting sample server ...") 38 | log.Fatal(http.ListenAndServe(":1317", nil)) 39 | } 40 | -------------------------------------------------------------------------------- /dubbotripleproxy/server/dubbo/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | application: 24 | name: dubbo-server 25 | registries: 26 | zk: 27 | protocol: zookeeper 28 | timeout: 3s 29 | address: 127.0.0.1:2181 30 | protocols: 31 | dubbo: 32 | name: dubbo 33 | port: 20000 34 | provider: 35 | registry-ids: zk 36 | services: 37 | DubboUserProvider: 38 | group: test 39 | serialization: hessian2 40 | interface: com.dubbogo.pixiu.DubboUserService 41 | version: 1.0.0 42 | cluster: test_dubbo -------------------------------------------------------------------------------- /dubbotripleproxy/server/triple/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | application: 24 | name: triple-server 25 | registries: 26 | zk: 27 | protocol: zookeeper 28 | timeout: 3s 29 | address: 127.0.0.1:2181 30 | protocols: 31 | triple: 32 | name: tri 33 | port: 20001 34 | provider: 35 | registry-ids: zk 36 | services: 37 | TripleUserProvider: 38 | group: test 39 | serialization: hessian2 40 | interface: com.dubbogo.pixiu.TripleUserService 41 | version: 1.0.0 42 | cluster: test_dubbo -------------------------------------------------------------------------------- /dubbogo/multi/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/conf/dubbogo.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | dubbo: 21 | application: 22 | version: 1.0.0 23 | registries: 24 | xds: 25 | protocol: xds 26 | # address: 127.0.0.1:18000 27 | address: istiod.istio-system.svc.cluster.local:15010 28 | protocols: 29 | dubbo: 30 | name: dubbo 31 | port: 20000 32 | provider: 33 | services: 34 | # GreeterServerImpl: 35 | # interface: "" # read from stub 36 | GreetingService: 37 | protocol: dubbo 38 | version: 1.0.0 39 | group: default 40 | serialization: hessian2 41 | interface: com.dubbo.demo.GreetingService 42 | -------------------------------------------------------------------------------- /dubbogo/simple/mix/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/uri/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | application: 23 | name: BDTService 24 | registries: 25 | zk: 26 | protocol: zookeeper 27 | timeout: 3s 28 | address: 127.0.0.1:2181 29 | registry-type: all 30 | protocols: 31 | dubbo: 32 | name: dubbo 33 | port: 20000 34 | provider: 35 | registry-ids: zk 36 | services: 37 | UserProvider: 38 | group: test 39 | version: 1.0.0 40 | cluster: test_dubbo 41 | serialization: hessian2 42 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/direct/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/jaeger/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/proxy/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/query/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/resolve/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/triple/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/api/api.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | syntax = "proto3"; 19 | package api; 20 | 21 | option go_package = "./;api"; 22 | 23 | // The greeting service definition. 24 | service Greeter { 25 | // Sends a greeting 26 | rpc SayHello (HelloRequest) returns (User) {} 27 | // Sends a greeting via stream 28 | rpc SayHelloStream (stream HelloRequest) returns (stream User) {} 29 | } 30 | 31 | // The request message containing the user's name. 32 | message HelloRequest { 33 | string name = 1; 34 | } 35 | 36 | // The response message containing the greetings 37 | message User { 38 | string name = 1; 39 | string id = 2; 40 | int32 age = 3; 41 | } -------------------------------------------------------------------------------- /dubbogo/simple/benchmark/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | sampling: 24 | encoding: "console" 25 | 26 | # encoder 27 | encoderConfig: 28 | messageKey: "message" 29 | levelKey: "level" 30 | timeKey: "time" 31 | nameKey: "logger" 32 | callerKey: "caller" 33 | stacktraceKey: "stacktrace" 34 | lineEnding: "" 35 | levelEncoder: "capitalColor" 36 | timeEncoder: "iso8601" 37 | durationEncoder: "seconds" 38 | callerEncoder: "short" 39 | nameEncoder: "" 40 | 41 | outputPaths: 42 | - "stderr" 43 | errorOutputPaths: 44 | - "stderr" 45 | initialFields: 46 | -------------------------------------------------------------------------------- /shutdown/dubbo/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | "net/http" 23 | "time" 24 | ) 25 | 26 | import ( 27 | "github.com/apache/dubbo-go-pixiu/pkg/common/constant" 28 | ) 29 | 30 | func main() { 31 | http.HandleFunc("/com.dubbogo.pixiu.TripleUserService/TestByDubbo", testFunc) 32 | log.Println("Starting sample server ...") 33 | log.Fatal(http.ListenAndServe(":20001", nil)) 34 | } 35 | 36 | func testFunc(w http.ResponseWriter, r *http.Request) { 37 | time.Sleep(3 * time.Second) 38 | w.Header().Set(constant.HeaderKeyContextType, constant.HeaderValueJsonUtf8) 39 | w.Write([]byte("{\"message\":\"receive\"}")) 40 | } 41 | -------------------------------------------------------------------------------- /.github/actions/actions-ding/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {DingBot} from '@zcong/ding-bot' 3 | 4 | const endpoint = 'https://oapi.dingtalk.com/robot/send' 5 | 6 | async function run(): Promise { 7 | try { 8 | const token = core.getInput('dingToken') 9 | const body = core.getInput('body') 10 | const secretStr = core.getInput('secret') 11 | const ignoreError = core.getInput('ignoreError') === 'true' 12 | const secret = secretStr === '' ? undefined : secretStr 13 | if (secret) { 14 | core.info('get secret, sign mode') 15 | } 16 | core.info(`Send body: ${body}`) 17 | const dingBot = new DingBot({ 18 | endpoint, 19 | accessToken: token, 20 | signKey: secret 21 | }) 22 | 23 | try { 24 | const resp = await dingBot.rawSend(body) 25 | 26 | if (resp?.errcode !== 0) { 27 | if (ignoreError) { 28 | core.warning(resp?.errmsg) 29 | return 30 | } else { 31 | core.setFailed(resp?.errmsg) 32 | } 33 | } 34 | } catch (requestErr) { 35 | core.error( 36 | `send request error, status: ${requestErr.response?.status}, data: ${requestErr.response?.data}` 37 | ) 38 | if (ignoreError) { 39 | core.warning(requestErr.message) 40 | return 41 | } else { 42 | core.setFailed(requestErr.message) 43 | } 44 | } 45 | } catch (error) { 46 | core.setFailed(error.message) 47 | } 48 | } 49 | 50 | run() 51 | -------------------------------------------------------------------------------- /http/grpc/proto/hello_grpc.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one or more 2 | // contributor license agreements. See the NOTICE file distributed with 3 | // this work for additional information regarding copyright ownership. 4 | // The ASF licenses this file to You under the Apache License, Version 2.0 5 | // (the "License"); you may not use this file except in compliance with 6 | // the License. You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | 17 | // protoc --proto_path=. --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative .\hello_grpc.proto 18 | syntax = "proto3"; 19 | 20 | option go_package = "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"; 21 | 22 | package provider; 23 | 24 | service UserProvider { 25 | rpc GetUser (GetUserRequest) returns (GetUserResponse); 26 | } 27 | 28 | message GetUserRequest { 29 | int32 userId = 1; 30 | } 31 | 32 | message GetUserResponse { 33 | string message = 1; 34 | repeated User users = 2; 35 | } 36 | 37 | message User { 38 | int32 userId = 1; 39 | string name = 2; 40 | } -------------------------------------------------------------------------------- /grpc/deprecated/proto/hello_grpc.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one or more 2 | // contributor license agreements. See the NOTICE file distributed with 3 | // this work for additional information regarding copyright ownership. 4 | // The ASF licenses this file to You under the Apache License, Version 2.0 5 | // (the "License"); you may not use this file except in compliance with 6 | // the License. You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | 17 | // protoc --proto_path=. --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative .\hello_grpc.proto 18 | syntax = "proto3"; 19 | 20 | option go_package = "github.com/apache/dubbo-go-pixiu/samples/http/grpc/proto"; 21 | 22 | package provider; 23 | 24 | service UserProvider { 25 | rpc GetUser (GetUserRequest) returns (GetUserResponse); 26 | } 27 | 28 | message GetUserRequest { 29 | int32 userId = 1; 30 | } 31 | 32 | message GetUserResponse { 33 | string message = 1; 34 | repeated User users = 2; 35 | } 36 | 37 | message User { 38 | int32 userId = 1; 39 | string name = 2; 40 | } -------------------------------------------------------------------------------- /plugins/ratelimit/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | "net/http" 23 | ) 24 | 25 | import ( 26 | "github.com/apache/dubbo-go-pixiu/pkg/common/constant" 27 | ) 28 | 29 | func main() { 30 | http.HandleFunc("/v1/", handle) 31 | log.Println("Starting sample server ...") 32 | log.Fatal(http.ListenAndServe(":1314", nil)) 33 | } 34 | 35 | func handle(w http.ResponseWriter, r *http.Request) { 36 | switch r.Method { 37 | case constant.Get: 38 | // w.WriteHeader(200) 39 | w.Header().Set(constant.HeaderKeyContextType, constant.HeaderValueJsonUtf8) 40 | w.WriteHeader(http.StatusOK) 41 | w.Write([]byte("resp")) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /dubbogo/simple/jwt/server/profiles/dev/log.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | level: "debug" 20 | development: true 21 | disableCaller: false 22 | disableStacktrace: false 23 | encoding: "console" 24 | 25 | # encoder 26 | encoderConfig: 27 | messageKey: "message" 28 | levelKey: "level" 29 | timeKey: "time" 30 | nameKey: "logger" 31 | callerKey: "caller" 32 | stacktraceKey: "stacktrace" 33 | lineEnding: "" 34 | levelEncoder: "capitalColor" 35 | timeEncoder: "iso8601" 36 | durationEncoder: "seconds" 37 | callerEncoder: "short" 38 | nameEncoder: "" 39 | 40 | outputPaths: 41 | - "stderr" 42 | errorOutputPaths: 43 | - "stderr" 44 | initialFields: 45 | -------------------------------------------------------------------------------- /dubbogo/simple/README_CN.md: -------------------------------------------------------------------------------- 1 | 2 | # Pixiu Dubbo-go 快速入门示例 3 | 4 | [English](./README.md) 5 | 6 | 本文档将引导您如何运行一个基于 Pixiu 网关和 Dubbo-go 的简单服务示例。 7 | 8 | --- 9 | 10 | ### 1. 运行步骤 11 | 12 | #### 第 1 步:进入示例目录 13 | 14 | 首先,克隆项目并进入本示例所在的目录。 15 | ```bash 16 | # 假设您已在项目根目录 17 | cd samples/dubbogo/simple/ 18 | ```` 19 | 20 | #### 第 2 步:环境准备 21 | 22 | 执行以下脚本来启动运行所需的依赖服务(如 Zookeeper),并准备相关配置文件。 23 | > **提示**: 请根据实际情况修改 `benchmark/pixiu/conf.yaml` 文件中的地址。 24 | 25 | ```bash 26 | # 此命令会准备 benchmark 案例所需的环境 27 | ./start.sh prepare benchmark 28 | ``` 29 | 30 | 31 | #### 第 3 步:启动后端 Dubbo 服务 32 | 33 | 启动作为服务提供者的 Dubbo-go 应用。 34 | 35 | ```bash 36 | ./start.sh startServer benchmark 37 | ``` 38 | 39 | #### 第 4 步:启动 Pixiu 网关 40 | 41 | 在独立的终端中启动 Pixiu 网关。 42 | 43 | ```bash 44 | ./start.sh startPixiu benchmark 45 | ``` 46 | 47 | ----- 48 | 49 | ### 2. 验证服务 50 | 51 | 您可以通过两种方式测试网关是否成功代理了后端服务。 52 | 53 | #### 方式 A:使用 cURL 直接测试 54 | 55 | 打开一个新的终端,执行以下 cURL 命令: 56 | 57 | ```bash 58 | curl -s -X GET 'http://127.0.0.1:8881/api/v1/test-dubbo/user/tc?age=66' 59 | ``` 60 | 61 | **预期响应:** 62 | 63 | 您应该会看到类似下面的 JSON 输出,证明 Pixiu 已成功调用后端服务并返回结果。 64 | 65 | ```json 66 | { 67 | "age": 55, 68 | "code": 1, 69 | "iD": "0001", 70 | "name": "tc", 71 | "time": "2021-08-01T18:08:41+08:00" 72 | } 73 | ``` 74 | 75 | #### 方式 B:运行客户端测试脚本 76 | 77 | 您也可以使用预置的测试脚本来发起调用。 78 | 79 | ```bash 80 | ./start.sh startTest benchmark 81 | ``` 82 | 83 | ----- 84 | 85 | ### 3. 清理环境 86 | 87 | 测试完成后,可以运行以下命令来停止所有本次示例启动的服务。 88 | 89 | ```bash 90 | ./start.sh clean 91 | ``` 92 | -------------------------------------------------------------------------------- /dubbogo/simple/triple/server/protobuf/api/samples_api.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | syntax = "proto3"; 19 | package org.apache.dubbogo.samples.api; 20 | 21 | option go_package = "./;api"; 22 | 23 | // The greeting service definition. 24 | service Greeter { 25 | // Sends a greeting 26 | rpc SayHello (HelloRequest) returns (User) {} 27 | // Sends a greeting via stream 28 | rpc SayHelloStream (stream HelloRequest) returns (stream User) {} 29 | } 30 | 31 | // The request message containing the user's name. 32 | message HelloRequest { 33 | string name = 1; 34 | } 35 | 36 | // The response message containing the greetings 37 | message User { 38 | string name = 1; 39 | string id = 2; 40 | int32 age = 3; 41 | } -------------------------------------------------------------------------------- /xds/dubbo-go-istio/server/pkg/service/service.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package service 19 | 20 | import ( 21 | "context" 22 | ) 23 | 24 | import ( 25 | "dubbo-go-app/api" 26 | 27 | "dubbo.apache.org/dubbo-go/v3/config" 28 | 29 | "github.com/dubbogo/gost/log/logger" 30 | ) 31 | 32 | type GreeterServerImpl struct { 33 | api.UnimplementedGreeterServer 34 | } 35 | 36 | func (s *GreeterServerImpl) SayHello(ctx context.Context, in *api.HelloRequest) (*api.User, error) { 37 | logger.Infof("Dubbo-go GreeterProvider get user name = %s\n", in.Name) 38 | return &api.User{Name: "Hello " + in.Name, Id: "12345", Age: 21}, nil 39 | } 40 | 41 | func init() { 42 | config.SetProviderService(&GreeterServerImpl{}) 43 | } 44 | -------------------------------------------------------------------------------- /dubbogo/simple/prometheus/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "fmt" 22 | "net/http" 23 | "strings" 24 | ) 25 | 26 | import ( 27 | "github.com/dubbogo/gost/log/logger" 28 | ) 29 | 30 | func main() { 31 | routers := []string{"/user", "/user/pixiu", "/prefix", "/health"} 32 | 33 | for _, router := range routers { 34 | msg := router[strings.LastIndex(router, "/")+1:] 35 | http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) { 36 | logger.Info("request received for", msg) 37 | fmt.Fprintf(w, `{"message":"%s","status":200}`, msg) 38 | }) 39 | } 40 | logger.Info("Listening on 1314") 41 | logger.Fatal(http.ListenAndServe(":1314", nil)) 42 | } 43 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | application: 23 | name: BDTService 24 | registries: 25 | nacos: 26 | protocol: nacos 27 | timeout: 3s 28 | address: 127.0.0.1:8848 29 | group: test-group 30 | namespace: test-namespace 31 | registry-type: all 32 | protocols: 33 | dubbo: 34 | name: dubbo 35 | port: 20010 36 | provider: 37 | registry-ids: nacos 38 | services: 39 | UserProvider: 40 | group: test 41 | version: 1.0.0 42 | cluster: test_dubbo 43 | serialization: hessian2 44 | interface: com.dubbogo.pixiu.UserService -------------------------------------------------------------------------------- /dubbogo/simple/triple/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | dubbo: 22 | application: 23 | name: BDTService 24 | registries: 25 | nacos: 26 | protocol: nacos 27 | timeout: 3s 28 | address: 127.0.0.1:8848 29 | registry-type: all 30 | protocols: 31 | triple: 32 | name: tri 33 | port: 20001 34 | provider: 35 | registry-ids: nacos 36 | services: 37 | # you may refer to `Reference()` method defined in `protobuf/triple/helloworld.pb.go` 38 | GreeterProvider: 39 | protocol-ids: triple # 使用上面定义的协议id 40 | serialization: protobuf 41 | # interface read from pb file 42 | interface: "org.apache.dubbogo.samples.api.Greeter" -------------------------------------------------------------------------------- /dubbogo/simple/triple/protobuf/api/helloworld.proto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | // this file is the same as dubbo-go-samples/api/samples_api.proto 19 | 20 | syntax = "proto3"; 21 | package org.apache.dubbogo.samples.api; 22 | 23 | option go_package = "./;api"; 24 | 25 | // The greeting service definition. 26 | service Greeter { 27 | // Sends a greeting 28 | rpc SayHello (HelloRequest) returns (User) {} 29 | // Sends a greeting via stream 30 | rpc SayHelloStream (stream HelloRequest) returns (stream User) {} 31 | } 32 | 33 | // The request message containing the user's name. 34 | message HelloRequest { 35 | string name = 1; 36 | } 37 | 38 | // The response message containing the greetings 39 | message User { 40 | string name = 1; 41 | string id = 2; 42 | int32 age = 3; 43 | } -------------------------------------------------------------------------------- /dubbogo/simple/body/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8881" 20 | 21 | API1=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/user" -d '{"id":"0003","code":3,"name":"dubbogo","age":99}' --header 'Content-Type: application/json') 22 | API2=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user" -d '{"id":"0003","code":3,"name":"dubbogo","age":77}' --header "Content-Type: application/json") 23 | API3=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user2" -d '{"name":"dubbogo","user":{"id":"0003","code":3,"name":"dubbogo","age":88}}' --header "Content-Type: application/json") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | #QUERY=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByName?name=dubbogo") 31 | #echo ${QUERY} 32 | done -------------------------------------------------------------------------------- /dubbogo/simple/csrf/server/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "encoding/base64" 22 | "fmt" 23 | "log" 24 | "net/http" 25 | ) 26 | 27 | func main() { 28 | http.HandleFunc("/login/", func(w http.ResponseWriter, r *http.Request) { 29 | query := r.URL.Query() 30 | _, _ = w.Write([]byte(tokenize(query.Get("secret"), query.Get("key")))) 31 | }) 32 | 33 | http.HandleFunc("/user/", func(w http.ResponseWriter, r *http.Request) { 34 | _, _ = w.Write([]byte(`{"message":"success","status":200}`)) 35 | }) 36 | log.Println("Starting sample server ...") 37 | log.Fatal(http.ListenAndServe(":1314", nil)) 38 | } 39 | 40 | func tokenize(secret, salt string) string { 41 | return base64.URLEncoding.EncodeToString([]byte(fmt.Sprintf("%s-%s", salt, secret))) 42 | } 43 | -------------------------------------------------------------------------------- /dubbogo/simple/jaeger/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8881" 20 | 21 | API1=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/user" -d '{"id":"0003","code":3,"name":"dubbogo","age":99}' --header 'Content-Type: application/json') 22 | API2=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user" -d '{"id":"0003","code":3,"name":"dubbogo","age":77}' --header "Content-Type: application/json") 23 | API3=$(curl -s -X PUT ${ADDRESS}"/api/v1/test-dubbo/user2" -d '{"name":"dubbogo","user":{"id":"0003","code":3,"name":"dubbogo","age":88}}' --header "Content-Type: application/json") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | #QUERY=$(curl -s -X GET ${ADDRESS}"/api/v1/test-dubbo/userByName?name=dubbogo") 31 | #echo ${QUERY} 32 | done -------------------------------------------------------------------------------- /dubbogo/simple/uri/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | --- 20 | static_resources: 21 | listeners: 22 | - name: "net/http" 23 | protocol_type: "HTTP" 24 | address: 25 | socket_address: 26 | address: "0.0.0.0" 27 | port: 8885 28 | config: 29 | idle_timeout: 5s 30 | read_timeout: 5s 31 | write_timeout: 5s 32 | clusters: 33 | - name: "test_dubbo" 34 | lb_policy: "RoundRobin" 35 | registries: 36 | "zookeeper": 37 | timeout: "3s" 38 | address: "127.0.0.1:2181" 39 | username: "" 40 | password: "" 41 | timeout_config: 42 | connect_timeout: "5s" 43 | request_timeout: "10s" 44 | shutdown_config: 45 | timeout: "60s" 46 | step_timeout: "10s" 47 | reject_policy: "immediacy" -------------------------------------------------------------------------------- /llm/nacos/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | services: 17 | nacos: 18 | image: nacos/nacos-server:v2.5.1-slim 19 | container_name: nacos-standalone 20 | environment: 21 | - PREFER_HOST_MODE=hostname 22 | - MODE=standalone 23 | - NACOS_AUTH_ENABLE=false 24 | ports: 25 | - "8848:8848" 26 | - "9848:9848" 27 | healthcheck: 28 | test: ["CMD", "curl", "-f", "http://localhost:8848/nacos/v1/cs/health"] 29 | interval: 10s 30 | timeout: 5s 31 | retries: 5 32 | 33 | registry: 34 | container_name: llm-registry-service 35 | build: 36 | context: . 37 | dockerfile: registry/Dockerfile 38 | env_file: 39 | - .env 40 | depends_on: 41 | nacos: 42 | condition: service_healthy 43 | environment: 44 | - NACOS_HOST=nacos -------------------------------------------------------------------------------- /.github/actions/review-dog/.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | on: 3 | push: 4 | branches: 5 | - master 6 | tags: 7 | - 'v*.*.*' 8 | 9 | jobs: 10 | release: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | # Bump version on merging Pull Requests with specific labels. 16 | # (bump:major,bump:minor,bump:patch) 17 | - id: bumpr 18 | if: "!startsWith(github.ref, 'refs/tags/')" 19 | uses: haya14busa/action-bumpr@v1 20 | 21 | # Update corresponding major and minor tag. 22 | # e.g. Update v1 and v1.2 when releasing v1.2.3 23 | - uses: haya14busa/action-update-semver@v1 24 | if: "!steps.bumpr.outputs.skip" 25 | with: 26 | tag: ${{ steps.bumpr.outputs.next_version }} 27 | 28 | # Get tag name. 29 | - id: tag 30 | uses: haya14busa/action-cond@v1 31 | with: 32 | cond: "${{ startsWith(github.ref, 'refs/tags/') }}" 33 | if_true: ${{ github.ref }} 34 | if_false: ${{ steps.bumpr.outputs.next_version }} 35 | 36 | # Create release. 37 | - uses: actions/create-release@v1 38 | if: "steps.tag.outputs.value != ''" 39 | env: 40 | # This token is provided by Actions, you do not need to create your own token 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | with: 43 | tag_name: ${{ steps.tag.outputs.value }} 44 | release_name: Release ${{ steps.tag.outputs.value }} 45 | body: ${{ steps.bumpr.outputs.message }} 46 | draft: false 47 | prerelease: false 48 | -------------------------------------------------------------------------------- /xds/filesystem-control-panel/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | #--- 21 | node: 22 | id: "test-id" 23 | cluster: "pixiu" 24 | 25 | dynamic_resources: 26 | lds_config: 27 | cluster_name: ["xds-server"] 28 | api_type: "GRPC" 29 | refresh_delay: "5s" 30 | request_timeout: "10s" 31 | grpc_services: 32 | - timeout: "5s" 33 | cds_config: 34 | cluster_name: ["xds-server"] 35 | api_type: "GRPC" 36 | refresh_delay: "5s" 37 | request_timeout: "10s" 38 | grpc_services: 39 | - timeout: "5s" 40 | static_resources: 41 | clusters: 42 | - name: "xds-server" 43 | type: "Static" 44 | endpoints: 45 | - socket_address: 46 | address: "127.0.0.1" 47 | port: 18000 48 | 49 | shutdown_config: 50 | timeout: "60s" 51 | step_timeout: "10s" 52 | reject_policy: "immediacy" -------------------------------------------------------------------------------- /xds/local-control-panel/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | #--- 21 | node: 22 | id: "test-id" 23 | cluster: "pixiu" 24 | 25 | dynamic_resources: 26 | lds_config: 27 | cluster_name: ["xds-server"] 28 | api_type: "GRPC" 29 | refresh_delay: "5s" 30 | request_timeout: "10s" 31 | grpc_services: 32 | - timeout: "5s" 33 | cds_config: 34 | cluster_name: ["xds-server"] 35 | api_type: "GRPC" 36 | refresh_delay: "5s" 37 | request_timeout: "10s" 38 | grpc_services: 39 | - timeout: "5s" 40 | static_resources: 41 | clusters: 42 | - name: "xds-server" 43 | type: "Static" 44 | endpoints: 45 | - socket_address: 46 | address: "127.0.0.1" 47 | port: 18000 48 | 49 | shutdown_config: 50 | timeout: "60s" 51 | step_timeout: "10s" 52 | reject_policy: "immediacy" 53 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | --- 20 | static_resources: 21 | listeners: 22 | - name: "net/http" 23 | protocol_type: "HTTP" 24 | address: 25 | socket_address: 26 | address: "0.0.0.0" 27 | port: 8881 28 | filter_chains: 29 | filters: 30 | - name: dgp.filter.httpconnectionmanager 31 | config: 32 | route_config: 33 | dynamic: true 34 | http_filters: 35 | - name: dgp.filter.http.directdubboproxy 36 | config: 37 | adapters: 38 | - id: test 39 | name: dgp.adapter.dubboregistrycenter 40 | config: 41 | registries: 42 | "zookeeper": 43 | registry_type: interface # or interface 44 | protocol: zookeeper 45 | address: "127.0.0.1:2181" 46 | timeout: "5s" -------------------------------------------------------------------------------- /shutdown/http2/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "context" 22 | "net" 23 | "time" 24 | ) 25 | 26 | import ( 27 | "google.golang.org/grpc" 28 | ) 29 | 30 | import ( 31 | gproto "github.com/dubbo-go-pixiu/samples/grpc/deprecated/proto" 32 | ) 33 | 34 | type grpcServer struct { 35 | users map[int32]*gproto.User 36 | gproto.UnimplementedUserProviderServer 37 | } 38 | 39 | func (s *grpcServer) GetUser(ctx context.Context, request *gproto.GetUserRequest) (*gproto.GetUserResponse, error) { 40 | // need 3s 41 | time.Sleep(3 * time.Second) 42 | return &gproto.GetUserResponse{Message: "receive"}, nil 43 | } 44 | 45 | func main() { 46 | listener, _ := net.Listen("tcp", ":50001") 47 | ser := &grpcServer{users: make(map[int32]*gproto.User)} 48 | gs := grpc.NewServer() 49 | gproto.RegisterUserProviderServer(gs, ser) 50 | gs.Serve(listener) 51 | } 52 | -------------------------------------------------------------------------------- /dubbogo/multi/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | registries: 24 | zk: 25 | protocol: zookeeper 26 | timeout: 3s 27 | address: 127.0.0.1:2181 28 | demoZk2: 29 | protocol: "zookeeper" 30 | timeout: "3s" 31 | address: "127.0.0.1:2182" 32 | protocols: 33 | dubbo: 34 | name: dubbo 35 | port: 20000 36 | provider: 37 | registry-ids: zk,demoZk2 38 | services: 39 | TeacherProvider: 40 | group: test 41 | version: 1.0.0 42 | cluster: test_dubbo 43 | serialization: hessian2 44 | interface: com.dubbogo.pixiu.TeacherService 45 | StudentProvider: 46 | group: test 47 | version: 1.0.0 48 | cluster: test_dubbo 49 | serialization: hessian2 50 | interface: com.dubbogo.pixiu.StudentService 51 | -------------------------------------------------------------------------------- /dubbogo/simple/proxy/request.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | ADDRESS="localhost:8883" 20 | 21 | API1=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/UserService/com.dubbogo.pixiu.UserService?group=test&version=1.0.0&method=GetUserByName" -d '{"types":"string","values":"tc"}' --header 'Content-Type: application/json') 22 | API2=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/UserService/com.dubbogo.pixiu.UserService?group=test&version=1.0.0&method=UpdateUserByName" -d '{"types":"string, object","values":["tc",{"id":"0001","code":1,"name":"tc","age":15}]}' --header "Content-Type: application/json") 23 | API3=$(curl -s -X POST ${ADDRESS}"/api/v1/test-dubbo/UserService/com.dubbogo.pixiu.UserService?group=test&version=1.0.0&method=GetUserByCode" -d '{"types":"int","values":1}' --header "Content-Type: application/json") 24 | 25 | ARRAY_API=(${API1} ${API2} ${API3}) 26 | 27 | for element in ${ARRAY_API[@]} 28 | do 29 | echo ${element} 30 | done -------------------------------------------------------------------------------- /plugins/opa/test/pixiu_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package test 19 | 20 | import ( 21 | "io" 22 | "net/http" 23 | "strings" 24 | "testing" 25 | "time" 26 | ) 27 | 28 | import ( 29 | "github.com/stretchr/testify/assert" 30 | ) 31 | 32 | func TestUserServiceAllow(t *testing.T) { 33 | url := "http://localhost:8888/UserService" 34 | client := &http.Client{Timeout: 5 * time.Second} 35 | 36 | req, err := http.NewRequest("GET", url, nil) 37 | assert.NoError(t, err) 38 | 39 | // Must add header to pass OPA 40 | req.Header.Set("Test_header", "1") 41 | 42 | resp, err := client.Do(req) 43 | assert.NoError(t, err) 44 | assert.NotNil(t, resp) 45 | assert.Equal(t, 200, resp.StatusCode) 46 | 47 | body, _ := io.ReadAll(resp.Body) 48 | // OPA allows -> backend returns "pass" JSON 49 | assert.True(t, strings.Contains(string(body), "pass")) 50 | assert.True(t, strings.Contains(string(body), "UserService")) 51 | } 52 | -------------------------------------------------------------------------------- /start_integrate_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one or more 5 | # contributor license agreements. See the NOTICE file distributed with 6 | # this work for additional information regarding copyright ownership. 7 | # The ASF licenses this file to You under the Apache License, Version 2.0 8 | # (the "License"); you may not use this file except in compliance with 9 | # the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | array=( 21 | "dubbogo/simple/body" 22 | "dubbogo/simple/jaeger" 23 | "dubbogo/simple/mix" 24 | "dubbogo/simple/proxy" 25 | "dubbogo/simple/query" 26 | "dubbogo/simple/uri" 27 | "dubbogo/simple/resolve" 28 | "dubbogo/simple/zookeeper" 29 | "dubbogo/simple/nacos" 30 | "dubbogo/simple/triple" 31 | "dubbogo/simple/direct" 32 | "dubbogo/simple/prometheus" 33 | # http 34 | "http/grpc" 35 | "http/simple" 36 | # grpc proxy 37 | "grpc/deprecated" 38 | # plugins 39 | "plugins/opa" 40 | ) 41 | 42 | for t in "${array[@]}"; do 43 | echo "::group::> start: $t" 44 | bash ./integrate_test.sh "$t" 45 | result=$? 46 | echo "::endgroup::" 47 | if [ "$result" -ne 0 ]; then 48 | echo "[ERROR] failed: $t (exit code: $result)" 49 | exit "$result" 50 | fi 51 | echo "> ok: $t" 52 | done 53 | 54 | echo "> all tests passed." 55 | -------------------------------------------------------------------------------- /dubbogo/simple/jaeger/server/profiles/dev/server.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | # dubbo server yaml configure file 20 | # application config 21 | 22 | dubbo: 23 | registries: 24 | zk: 25 | protocol: zookeeper 26 | timeout: 3s 27 | address: 127.0.0.1:2181 28 | protocols: 29 | dubbo: 30 | name: dubbo 31 | port: 20000 32 | provider: 33 | registry-ids: zk 34 | filter: generic_service,execute,pshutdown,tracing #metrics,echo,token,tps,accesslog, 35 | services: 36 | UserProvider: 37 | # filter: echo,metrics,token,accesslog,tps,generic_service,execute,pshutdown,tracing 38 | group: test 39 | version: 1.0.0 40 | cluster: test_dubbo 41 | serialization: hessian2 42 | interface: com.dubbogo.pixiu.UserService 43 | # tracing: 44 | # UserService: 45 | # ServiceName: "dubbo-user-service" 46 | # Address: "http://127.0.0.1:14268/api/traces" 47 | -------------------------------------------------------------------------------- /plugins/opa/server/app/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "encoding/json" 22 | "log" 23 | "net/http" 24 | "strings" 25 | ) 26 | 27 | type Resp struct { 28 | Message string `json:"message"` 29 | Result string `json:"result"` 30 | } 31 | 32 | func main() { 33 | routers := []string{"/UserService", "/OtherService"} 34 | 35 | for _, rt := range routers { 36 | route := rt 37 | msg := route[strings.LastIndex(route, "/")+1:] 38 | 39 | http.HandleFunc(route, func(w http.ResponseWriter, r *http.Request) { 40 | 41 | log.Printf("[backend] %s %s Headers=%v", r.Method, r.URL.Path, r.Header) 42 | 43 | w.Header().Set("Content-Type", "application/json") 44 | _ = json.NewEncoder(w).Encode(Resp{ 45 | Message: msg, 46 | Result: "pass", 47 | }) 48 | }) 49 | } 50 | 51 | log.Println("Starting sample server on :1314 ...") 52 | log.Fatal(http.ListenAndServe(":1314", nil)) 53 | } 54 | -------------------------------------------------------------------------------- /dubbogo/simple/direct/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | --- 20 | static_resources: 21 | listeners: 22 | - name: "net/http" 23 | protocol_type: "HTTP" 24 | address: 25 | socket_address: 26 | address: "0.0.0.0" 27 | port: 8883 28 | filter_chains: 29 | filters: 30 | - name: dgp.filter.httpconnectionmanager 31 | config: 32 | route_config: 33 | routes: 34 | - match: 35 | prefix: "/UserService" 36 | route: 37 | cluster: "user" 38 | http_filters: 39 | - name: dgp.filter.http.directdubboproxy 40 | config: 41 | clusters: 42 | - name: "user" 43 | lb_policy: "lb" 44 | endpoints: 45 | - id: 1 46 | socket_address: 47 | address: 127.0.0.1 48 | port: 20000 -------------------------------------------------------------------------------- /dubbogo/simple/nacos/pixiu/conf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | --- 20 | static_resources: 21 | listeners: 22 | - name: "net/http" 23 | protocol_type: "HTTP" 24 | address: 25 | socket_address: 26 | address: "0.0.0.0" 27 | port: 8881 28 | filter_chains: 29 | filters: 30 | - name: dgp.filter.httpconnectionmanager 31 | config: 32 | route_config: 33 | dynamic: true 34 | http_filters: 35 | - name: dgp.filter.http.directdubboproxy 36 | config: 37 | adapters: 38 | - id: test 39 | name: dgp.adapter.dubboregistrycenter 40 | config: 41 | registries: 42 | nacos: 43 | registry_type: interface # or interface 44 | protocol: nacos 45 | address: "127.0.0.1:8848" 46 | timeout: "5s" 47 | group: test-group 48 | namespace: test-namespace -------------------------------------------------------------------------------- /dubbogo/simple/triple/test/pixiu_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package test 19 | 20 | import ( 21 | "io" 22 | "net/http" 23 | "strings" 24 | "testing" 25 | "time" 26 | ) 27 | 28 | import ( 29 | "github.com/stretchr/testify/assert" 30 | ) 31 | 32 | func TestPost1(t *testing.T) { 33 | url := "http://localhost:8881/BDTService/org.apache.dubbogo.samples.api.Greeter/SayHello" 34 | data := "{\"name\":\"test\"}" 35 | client := &http.Client{Timeout: 5 * time.Second} 36 | req, err := http.NewRequest("POST", url, strings.NewReader(data)) 37 | assert.NoError(t, err) 38 | req.Header.Add("Content-Type", "application/json") 39 | req.Header.Add("tri-req-id", "test-req-id-1") 40 | req.Header.Add("tri-req-id", "test-req-id-2") 41 | resp, err := client.Do(req) 42 | assert.NoError(t, err) 43 | assert.NotNil(t, resp) 44 | assert.Equal(t, 200, resp.StatusCode) 45 | s, _ := io.ReadAll(resp.Body) 46 | assert.True(t, strings.Contains(string(s), "Hello test")) 47 | } 48 | -------------------------------------------------------------------------------- /tools/authserver/server.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | "net/http" 23 | ) 24 | 25 | const ( 26 | listenAddr = ":9000" 27 | // issuerBaseURL is the base URL for the OAuth issuer 28 | issuerBaseURL = "http://localhost:9000" 29 | ) 30 | 31 | func main() { 32 | // Initialize data stores and JWT keys. 33 | initStore() 34 | initJWT() 35 | 36 | // Setup HTTP routes. 37 | http.HandleFunc("/register", handleDynamicClientRegistration) 38 | http.HandleFunc("/.well-known/oauth-authorization-server", handleMetadata) 39 | http.HandleFunc("/.well-known/jwks.json", handleJwks) 40 | http.HandleFunc("/oauth/authorize", handleAuthorize) 41 | http.HandleFunc("/oauth/token", handleToken) 42 | 43 | log.Printf("OAuth Authorization Server listening on %s", listenAddr) 44 | 45 | // Start the server. 46 | if err := http.ListenAndServe(listenAddr, corsMiddleware(http.DefaultServeMux)); err != nil { 47 | log.Fatalf("failed to start server: %v", err) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /dubbogo/simple/zookeeper/test/pixiu_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package test 19 | 20 | import ( 21 | "io" 22 | "net/http" 23 | "strings" 24 | "testing" 25 | "time" 26 | ) 27 | 28 | import ( 29 | "github.com/stretchr/testify/assert" 30 | ) 31 | 32 | func TestPost1(t *testing.T) { 33 | url := "http://localhost:8881/BDTService/com.dubbogo.pixiu.UserService/GetUserByName" 34 | data := "[\"tc\"]" 35 | client := &http.Client{Timeout: 5 * time.Second} 36 | req, err := http.NewRequest("POST", url, strings.NewReader(data)) 37 | assert.NoError(t, err) 38 | req.Header.Add("Content-Type", "application/json") 39 | req.Header.Set("x-dubbo-service-version", "1.0.0") 40 | req.Header.Set("x-dubbo-service-protocol", "dubbo") 41 | req.Header.Set("x-dubbo-service-group", "test") 42 | resp, err := client.Do(req) 43 | assert.NoError(t, err) 44 | assert.NotNil(t, resp) 45 | assert.Equal(t, 200, resp.StatusCode) 46 | s, _ := io.ReadAll(resp.Body) 47 | assert.True(t, strings.Contains(string(s), "0001")) 48 | } 49 | -------------------------------------------------------------------------------- /https/pixiu/api_config.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | name: pixiu 20 | description: pixiu sample 21 | resources: 22 | - path: '/api/v1/test-dubbo/:application/:interface' 23 | type: restful 24 | description: common 25 | methods: 26 | - httpVerb: POST 27 | enable: true 28 | timeout: 1000ms 29 | inboundRequest: 30 | requestType: http 31 | integrationRequest: 32 | requestType: dubbo 33 | mappingParams: 34 | - name: requestBody.values 35 | mapTo: opt.values 36 | - name: requestBody.types 37 | mapTo: opt.types 38 | - name: uri.application 39 | mapTo: opt.application 40 | - name: uri.interface 41 | mapTo: opt.interface 42 | - name: queryStrings.method 43 | mapTo: opt.method 44 | - name: queryStrings.group 45 | mapTo: opt.group 46 | - name: queryStrings.version 47 | mapTo: opt.version 48 | clusterName: "test_dubbo" -------------------------------------------------------------------------------- /xds/filesystem-control-panel/server/logger.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | ) 23 | 24 | // Logger An example of a logger that implements `pkg/log/Logger`. Logs to 25 | // stdout. If Debug == false then Debugf() and Infof() won't output 26 | // anything. 27 | type Logger struct { 28 | Debug bool 29 | } 30 | 31 | // Debugf Log to stdout only if Debug is true. 32 | func (logger Logger) Debugf(format string, args ...interface{}) { 33 | if logger.Debug { 34 | log.Printf(format+"\n", args...) 35 | } 36 | } 37 | 38 | // Log to stdout only if Debug is true. 39 | func (logger Logger) Infof(format string, args ...interface{}) { 40 | if logger.Debug { 41 | log.Printf(format+"\n", args...) 42 | } 43 | } 44 | 45 | // Warnf ErrorfLog to stdout always. 46 | func (logger Logger) Warnf(format string, args ...interface{}) { 47 | log.Printf(format+"\n", args...) 48 | } 49 | 50 | // Errorf Log to stdout always. 51 | func (logger Logger) Errorf(format string, args ...interface{}) { 52 | log.Printf(format+"\n", args...) 53 | } 54 | -------------------------------------------------------------------------------- /xds/local-control-panel/server/app/logger.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package main 19 | 20 | import ( 21 | "log" 22 | ) 23 | 24 | // Logger An example of a logger that implements `pkg/log/Logger`. Logs to 25 | // stdout. If Debug == false then Debugf() and Infof() won't output 26 | // anything. 27 | type Logger struct { 28 | Debug bool 29 | } 30 | 31 | // Debugf Log to stdout only if Debug is true. 32 | func (logger Logger) Debugf(format string, args ...interface{}) { 33 | if logger.Debug { 34 | log.Printf(format+"\n", args...) 35 | } 36 | } 37 | 38 | // Log to stdout only if Debug is true. 39 | func (logger Logger) Infof(format string, args ...interface{}) { 40 | if logger.Debug { 41 | log.Printf(format+"\n", args...) 42 | } 43 | } 44 | 45 | // Warnf ErrorfLog to stdout always. 46 | func (logger Logger) Warnf(format string, args ...interface{}) { 47 | log.Printf(format+"\n", args...) 48 | } 49 | 50 | // Errorf Log to stdout always. 51 | func (logger Logger) Errorf(format string, args ...interface{}) { 52 | log.Printf(format+"\n", args...) 53 | } 54 | -------------------------------------------------------------------------------- /dubbogo/simple/nacos/test/pixiu_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package test 19 | 20 | import ( 21 | "io" 22 | "net/http" 23 | "strings" 24 | "testing" 25 | "time" 26 | ) 27 | 28 | import ( 29 | "github.com/stretchr/testify/assert" 30 | ) 31 | 32 | func TestPost1(t *testing.T) { 33 | url := "http://localhost:8881/BDTService/com.dubbogo.pixiu.UserService/GetUserByName" 34 | data := "[\"tc\"]" 35 | client := &http.Client{Timeout: 5 * time.Second} 36 | req, err := http.NewRequest("POST", url, strings.NewReader(data)) 37 | req.Header.Set("x-dubbo-http1.1-dubbo-version", "1.0.0") 38 | req.Header.Set("x-dubbo-service-protocol", "dubbo") 39 | req.Header.Set("x-dubbo-service-version", "1.0.0") 40 | req.Header.Set("x-dubbo-service-group", "test") 41 | assert.NoError(t, err) 42 | req.Header.Add("Content-Type", "application/json") 43 | resp, err := client.Do(req) 44 | assert.NoError(t, err) 45 | assert.NotNil(t, resp) 46 | assert.Equal(t, 200, resp.StatusCode) 47 | s, _ := io.ReadAll(resp.Body) 48 | assert.True(t, strings.Contains(string(s), "0001")) 49 | } 50 | -------------------------------------------------------------------------------- /dubbogo/simple/proxy/pixiu/api_config.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | name: pixiu 20 | description: pixiu sample 21 | resources: 22 | - path: '/api/v1/test-dubbo/:application/:interface' 23 | type: restful 24 | description: common 25 | methods: 26 | - httpVerb: POST 27 | enable: true 28 | timeout: 1000ms 29 | inboundRequest: 30 | requestType: http 31 | integrationRequest: 32 | requestType: dubbo 33 | mappingParams: 34 | - name: requestBody.values 35 | mapTo: opt.values 36 | - name: requestBody.types 37 | mapTo: opt.types 38 | - name: uri.application 39 | mapTo: opt.application 40 | - name: uri.interface 41 | mapTo: opt.interface 42 | - name: queryStrings.method 43 | mapTo: opt.method 44 | - name: queryStrings.group 45 | mapTo: opt.group 46 | - name: queryStrings.version 47 | mapTo: opt.version 48 | clusterName: "test_dubbo" --------------------------------------------------------------------------------