Merge branch 'main' into feature/wasm
diff --git a/.github/actions/actions-ding/action.yml b/.github/actions/actions-ding/action.yml
index 32f63c5..e732559 100644
--- a/.github/actions/actions-ding/action.yml
+++ b/.github/actions/actions-ding/action.yml
@@ -19,5 +19,5 @@
required: false
runs:
- using: 'node12'
+ using: 'node16'
main: 'dist/index.js'
diff --git a/.gitignore b/.gitignore
index 1d849e8..9f981b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,5 +22,6 @@
*.iml
*.exe
+test
target/
diff --git a/dubbogo/simple/farconfnacos/README.md b/dubbogo/simple/farconfnacos/README.md
new file mode 100644
index 0000000..295cc93
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/README.md
@@ -0,0 +1,28 @@
+环境准备:
+1. 安装 docker
+2. 安装 goland,会在 goland 中启动 server、pixiu、test
+
+结构图:
+见 farconfnacos.png
+
+案例运行步骤:
+1. 在 docker 中启动 zk 和 nacos. 其中 zk 作为配置中心;nacos 作为远端配置中心,存储 pixiu 的启动参数
+2. 在 nacos 中创建配置,配置内容为 farconfnacos/nacos 目录中文件
+3. 设置命令行参数,启动 dubbogo server:
+- Working directory:
+- D:\mongo\samples\dubbogo\simple\farconfnacos\server
+
+- Environment:
+- APP_LOG_CONF_FILE=./profiles/dev/log.yml;DUBBO_GO_CONFIG_PATH=./profiles/dev/server.yml
+
+4. 设置命令行参数,启动 pixiu:
+- Package path:
+- github.com/apache/dubbo-go-pixiu/cmd/pixiu
+
+- Working directory:
+- D:/mongo/dubbo-go-pixiu-develop
+
+- Program arguments:
+- gateway start -c D:\mongo\dubbo-go-pixiu-samples\dubbogo\simple\farconfnacos\pixiu\conf.yaml
+
+5. 运行 test,查看结果
\ No newline at end of file
diff --git a/dubbogo/simple/farconfnacos/docker/docker-compose.yml b/dubbogo/simple/farconfnacos/docker/docker-compose.yml
new file mode 100644
index 0000000..e03a52e
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/docker/docker-compose.yml
@@ -0,0 +1,36 @@
+#
+# Licensed to Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Apache Software Foundation (ASF) licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+version: '3'
+
+services:
+ zookeeper:
+ image: zookeeper
+ ports:
+ - 2181:2181
+ restart: on-failure
+ nacos:
+ image: nacos/nacos-server:2.0.1
+ container_name: nacos-standalone
+ environment:
+ - PREFER_HOST_MODE=hostname
+ - MODE=standalone
+ - NACOS_AUTH_ENABLE=true
+ ports:
+ - "8848:8848"
diff --git a/dubbogo/simple/farconfnacos/farconfnacos.png b/dubbogo/simple/farconfnacos/farconfnacos.png
new file mode 100644
index 0000000..709f3b0
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/farconfnacos.png
Binary files differ
diff --git a/dubbogo/simple/farconfnacos/nacos/nacos.yaml b/dubbogo/simple/farconfnacos/nacos/nacos.yaml
new file mode 100644
index 0000000..25cfe4d
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/nacos/nacos.yaml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+---
+static_resources:
+ listeners:
+ - name: "net/http"
+ protocol_type: "HTTP"
+ address:
+ socket_address:
+ address: "0.0.0.0"
+ port: 8881
+ filter_chains:
+ filters:
+ - name: dgp.filter.httpconnectionmanager
+ config:
+ route_config:
+ routes:
+ - match:
+ prefix: "*"
+ http_filters:
+ - name: dgp.filter.http.dubboproxy
+ config:
+ dubboProxyConfig:
+ auto_resolve: true
+ registries:
+ "zookeeper":
+ protocol: "zookeeper"
+ timeout: "3s"
+ address: "127.0.0.1:2181"
+ username: ""
+ password: ""
+ timeout_config:
+ connect_timeout: 5s
+ request_timeout: 5s
+
+ server_name: "test_http_dubbo"
+ generate_request_id: false
+ config:
+ idle_timeout: 5s
+ read_timeout: 5s
+ write_timeout: 5s
+ shutdown_config:
+ timeout: "60s"
+ step_timeout: "10s"
+ reject_policy: "immediacy"
\ No newline at end of file
diff --git a/dubbogo/simple/farconfnacos/pixiu/conf.yaml b/dubbogo/simple/farconfnacos/pixiu/conf.yaml
new file mode 100644
index 0000000..96e9ae8
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/pixiu/conf.yaml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+config-center:
+ type: nacos
+ enable: true
+nacos:
+ server-configs:
+ - ip_addr: "127.0.0.1"
+ port: 8848
+ client-config:
+ username: nacos
+ password: nacos
\ No newline at end of file
diff --git a/dubbogo/simple/farconfnacos/server/app/server.go b/dubbogo/simple/farconfnacos/server/app/server.go
new file mode 100644
index 0000000..776280f
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/server/app/server.go
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "os/signal"
+ "syscall"
+ "time"
+)
+
+import (
+ "dubbo.apache.org/dubbo-go/v3/common/logger"
+ "dubbo.apache.org/dubbo-go/v3/config"
+ _ "dubbo.apache.org/dubbo-go/v3/imports"
+)
+
+// Version dubbo version
+const Version = "2.7.5"
+
+var survivalTimeout = int(3e9)
+
+// they are necessary:
+// export DUBBO_GO_CONFIG_PATH="../profiles/dev/server.yml"
+// export APP_LOG_CONF_FILE="../profiles/dev/log.yml"
+func main() {
+ config.Load()
+ logger.Infof("dubbo version is: %s", Version)
+ initSignal()
+}
+
+func initSignal() {
+ signals := make(chan os.Signal, 1)
+ // It is not possible to block SIGKILL or syscall.SIGSTOP
+ signal.Notify(signals, os.Interrupt, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
+ for {
+ sig := <-signals
+ logger.Infof("get signal %s", sig.String())
+ switch sig {
+ case syscall.SIGHUP:
+ // reload()
+ default:
+ time.AfterFunc(time.Duration(survivalTimeout), func() {
+ logger.Warnf("app exit now by force...")
+ os.Exit(1)
+ })
+
+ // The program exits normally or timeout forcibly exits.
+ fmt.Println("provider app exit now...")
+ return
+ }
+ }
+}
diff --git a/dubbogo/simple/farconfnacos/server/app/user.go b/dubbogo/simple/farconfnacos/server/app/user.go
new file mode 100644
index 0000000..35cc39b
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/server/app/user.go
@@ -0,0 +1,280 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package main
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "sync"
+ "time"
+)
+
+import (
+ "dubbo.apache.org/dubbo-go/v3/config"
+
+ hessian "github.com/apache/dubbo-go-hessian2"
+)
+
+func init() {
+ config.SetProviderService(new(UserProvider))
+ // ------for hessian2------
+ hessian.RegisterPOJO(&User{})
+
+ cache = newUserDB()
+
+ t1, _ := time.Parse(
+ time.RFC3339,
+ "2021-08-01T10:08:41+00:00")
+
+ cache.Add(&User{ID: "0001", Code: 1, Name: "tc", Age: 18, Time: t1})
+ cache.Add(&User{ID: "0002", Code: 2, Name: "ic", Age: 88, Time: t1})
+}
+
+var cache *userDB
+
+// userDB cache user.
+type userDB struct {
+ // key is name, value is user obj
+ nameIndex map[string]*User
+ // key is code, value is user obj
+ codeIndex map[int64]*User
+ lock sync.Mutex
+}
+
+// userDB create func
+func newUserDB() *userDB {
+ return &userDB{
+ nameIndex: make(map[string]*User, 16),
+ codeIndex: make(map[int64]*User, 16),
+ lock: sync.Mutex{},
+ }
+}
+
+// nolint
+func (db *userDB) Add(u *User) bool {
+ db.lock.Lock()
+ defer db.lock.Unlock()
+
+ if u.Name == "" || u.Code <= 0 {
+ return false
+ }
+
+ if !db.existName(u.Name) && !db.existCode(u.Code) {
+ return db.AddForName(u) && db.AddForCode(u)
+ }
+
+ return false
+}
+
+// nolint
+func (db *userDB) AddForName(u *User) bool {
+ if len(u.Name) == 0 {
+ return false
+ }
+
+ if _, ok := db.nameIndex[u.Name]; ok {
+ return false
+ }
+
+ db.nameIndex[u.Name] = u
+ return true
+}
+
+// nolint
+func (db *userDB) AddForCode(u *User) bool {
+ if u.Code <= 0 {
+ return false
+ }
+
+ if _, ok := db.codeIndex[u.Code]; ok {
+ return false
+ }
+
+ db.codeIndex[u.Code] = u
+ return true
+}
+
+// nolint
+func (db *userDB) GetByName(n string) (*User, bool) {
+ db.lock.Lock()
+ defer db.lock.Unlock()
+
+ r, ok := db.nameIndex[n]
+ return r, ok
+}
+
+// nolint
+func (db *userDB) GetByCode(n int64) (*User, bool) {
+ db.lock.Lock()
+ defer db.lock.Unlock()
+
+ r, ok := db.codeIndex[n]
+ return r, ok
+}
+
+func (db *userDB) existName(name string) bool {
+ if len(name) <= 0 {
+ return false
+ }
+
+ _, ok := db.nameIndex[name]
+ if ok {
+ return true
+ }
+
+ return false
+}
+
+func (db *userDB) existCode(code int64) bool {
+ if code <= 0 {
+ return false
+ }
+
+ _, ok := db.codeIndex[code]
+ if ok {
+ return true
+ }
+
+ return false
+}
+
+// User user obj.
+type User struct {
+ ID string `json:"id,omitempty"`
+ Code int64 `json:"code,omitempty"`
+ Name string `json:"name,omitempty"`
+ Age int32 `json:"age,omitempty"`
+ Time time.Time `json:"time,omitempty"`
+}
+
+// UserProvider the dubbo provider.
+// like: version: 1.0.0 group: test
+type UserProvider struct{}
+
+// CreateUser new user, PX config POST.
+func (u *UserProvider) CreateUser(ctx context.Context, user *User) (*User, error) {
+ outLn("Req CreateUser data:%#v", user)
+ if user == nil {
+ return nil, errors.New("not found")
+ }
+ _, ok := cache.GetByName(user.Name)
+ if ok {
+ return nil, errors.New("data is exist")
+ }
+
+ b := cache.Add(user)
+ if b {
+ return user, nil
+ }
+
+ return nil, errors.New("add error")
+}
+
+// GetUserByName query by name, single param, PX config GET.
+func (u *UserProvider) GetUserByName(ctx context.Context, name string) (*User, error) {
+ outLn("Req GetUserByName name:%#v", name)
+ r, ok := cache.GetByName(name)
+ if ok {
+ outLn("Req GetUserByName result:%#v", r)
+ return r, nil
+ }
+ return nil, nil
+}
+
+// GetUserByCode query by code, single param, PX config GET.
+func (u *UserProvider) GetUserByCode(ctx context.Context, code int64) (*User, error) {
+ outLn("Req GetUserByCode name:%#v", code)
+ r, ok := cache.GetByCode(code)
+ if ok {
+ outLn("Req GetUserByCode result:%#v", r)
+ return r, nil
+ }
+ return nil, nil
+}
+
+// GetUserTimeout query by name, will timeout for pixiu.
+func (u *UserProvider) GetUserTimeout(ctx context.Context, name string) (*User, error) {
+ outLn("Req GetUserByName name:%#v", name)
+ // sleep 10s, pixiu config less than 10s.
+ time.Sleep(10 * time.Second)
+ r, ok := cache.GetByName(name)
+ if ok {
+ outLn("Req GetUserByName result:%#v", r)
+ return r, nil
+ }
+ return nil, nil
+}
+
+// GetUserByNameAndAge query by name and age, two params, PX config GET.
+func (u *UserProvider) GetUserByNameAndAge(ctx context.Context, name string, age int32) (*User, error) {
+ outLn("Req GetUserByNameAndAge name:%s, age:%d", name, age)
+ r, ok := cache.GetByName(name)
+ if ok && r.Age == age {
+ outLn("Req GetUserByNameAndAge result:%#v", r)
+ return r, nil
+ }
+ return r, nil
+}
+
+// UpdateUser update by user struct, my be another struct, PX config POST or PUT.
+func (u *UserProvider) UpdateUser(ctx context.Context, user *User) (bool, error) {
+ outLn("Req UpdateUser data:%#v", user)
+ r, ok := cache.GetByName(user.Name)
+ if ok {
+ if user.ID != "" {
+ r.ID = user.ID
+ }
+ if user.Age >= 0 {
+ r.Age = user.Age
+ }
+ return true, nil
+ }
+ return false, errors.New("not found")
+}
+
+// UpdateUserByName update by user struct, my be another struct, PX config POST or PUT.
+func (u *UserProvider) UpdateUserByName(ctx context.Context, name string, user *User) (bool, error) {
+ outLn("Req UpdateUserByName data:%#v", user)
+ r, ok := cache.GetByName(name)
+ if ok {
+ if user.ID != "" {
+ r.ID = user.ID
+ }
+ if user.Age >= 0 {
+ r.Age = user.Age
+ }
+ return true, nil
+ }
+ return false, errors.New("not found")
+}
+
+// nolint
+func (u *UserProvider) Reference() string {
+ return "UserProvider"
+}
+
+// nolint
+func (u User) JavaClassName() string {
+ return "com.dubbogo.pixiu.User"
+}
+
+// nolint
+func outLn(format string, args ...interface{}) {
+ fmt.Printf("\033[32;40m"+format+"\033[0m\n", args...)
+}
diff --git a/dubbogo/simple/farconfnacos/server/profiles/dev/log.yml b/dubbogo/simple/farconfnacos/server/profiles/dev/log.yml
new file mode 100644
index 0000000..9330cda
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/server/profiles/dev/log.yml
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+level: "debug"
+development: true
+disableCaller: false
+disableStacktrace: false
+sampling:
+encoding: "console"
+
+# encoder
+encoderConfig:
+ messageKey: "message"
+ levelKey: "level"
+ timeKey: "time"
+ nameKey: "logger"
+ callerKey: "caller"
+ stacktraceKey: "stacktrace"
+ lineEnding: ""
+ levelEncoder: "capitalColor"
+ timeEncoder: "iso8601"
+ durationEncoder: "seconds"
+ callerEncoder: "short"
+ nameEncoder: ""
+
+outputPaths:
+ - "stderr"
+errorOutputPaths:
+ - "stderr"
+initialFields:
diff --git a/dubbogo/simple/farconfnacos/server/profiles/dev/server.yml b/dubbogo/simple/farconfnacos/server/profiles/dev/server.yml
new file mode 100644
index 0000000..c93feb2
--- /dev/null
+++ b/dubbogo/simple/farconfnacos/server/profiles/dev/server.yml
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# dubbo server yaml configure file
+# application config
+dubbo:
+ registries:
+ zk:
+ protocol: zookeeper
+ timeout: 3s
+ address: 127.0.0.1:2181
+ protocols:
+ dubbo:
+ name: dubbo
+ port: 20000
+ provider:
+ registry-ids: zk
+ services:
+ UserProvider:
+ group: test
+ version: 1.0.0
+ cluster: test_dubbo
+ serialization: hessian2
+ interface: com.dubbogo.pixiu.UserService
\ No newline at end of file
diff --git a/dubbogo/simple/prometheus/pixiu/conf.yaml b/dubbogo/simple/prometheus/pixiu/conf.yaml
index 8ff6c5a..3dcf781 100644
--- a/dubbogo/simple/prometheus/pixiu/conf.yaml
+++ b/dubbogo/simple/prometheus/pixiu/conf.yaml
@@ -32,18 +32,29 @@
route_config:
routes:
- match:
+ prefix: /health
+ route:
+ cluster: user
+ cluster_not_found_response_code: 505
+ - match:
prefix: /user
route:
cluster: user
cluster_not_found_response_code: 505
- http_filters:
+ - match:
+ prefix: /prefix
+ route:
+ cluster: user
+ cluster_not_found_response_code: 505
+ http_filters:
- name: dgp.filter.http.prometheusmetric
metric_collect_rules:
- enable: true
metric_path: "/metrics"
push_gateway_url: "http://127.0.0.1:9091"
- push_interval_seconds: 3
+ counter_push: true
+ push_interval_threshold: 3
push_job_name: "prometheus"
+ - name: dgp.filter.http.httpproxy
config:
idle_timeout: 5s
read_timeout: 5s
diff --git a/dubbogo/simple/prometheus/pixiu_test.go b/dubbogo/simple/prometheus/pixiu_test.go
deleted file mode 100644
index a4433b1..0000000
--- a/dubbogo/simple/prometheus/pixiu_test.go
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package prometheus
-
-import (
- "net/http"
- "testing"
- "time"
-)
-
-import (
- "github.com/stretchr/testify/assert"
-)
-
-func TestLocalRemote(t *testing.T) {
- client := &http.Client{Timeout: 5 * time.Second}
- req, err := http.NewRequest(http.MethodGet, "http://localhost:1314/user", nil)
- assert.NoError(t, err)
- resp, err := client.Do(req)
- assert.NoError(t, err)
- assert.Equal(t, http.StatusOK, resp.StatusCode)
- assert.NotNil(t, resp)
-}
diff --git a/dubbogo/simple/prometheus/server/server.go b/dubbogo/simple/prometheus/server/app/server.go
similarity index 74%
rename from dubbogo/simple/prometheus/server/server.go
rename to dubbogo/simple/prometheus/server/app/server.go
index 38997ab..bdfada9 100644
--- a/dubbogo/simple/prometheus/server/server.go
+++ b/dubbogo/simple/prometheus/server/app/server.go
@@ -21,16 +21,18 @@
"fmt"
"log"
"net/http"
-)
-
-var (
- router = "/user"
+ "strings"
)
func main() {
- http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) {
- _, _ = w.Write([]byte(fmt.Sprintf(`{"method":"%s","data":%d}`, "POST", 100)))
- })
+ routers := []string{"/user", "/user/pixiu", "/prefix", "/health"}
+
+ for _, router := range routers {
+ msg := router[strings.LastIndex(router, "/")+1:]
+ http.HandleFunc(router, func(w http.ResponseWriter, r *http.Request) {
+ _, _ = w.Write([]byte(fmt.Sprintf(`{"message":"%s","status":200}`, msg)))
+ })
+ }
log.Println("Starting sample server ...")
log.Fatal(http.ListenAndServe(":1314", nil))
}
diff --git a/dubbogo/simple/prometheus/test/pixiu_test.go b/dubbogo/simple/prometheus/test/pixiu_test.go
new file mode 100644
index 0000000..958a816
--- /dev/null
+++ b/dubbogo/simple/prometheus/test/pixiu_test.go
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package prometheus
+
+import (
+ "io/ioutil"
+ "net/http"
+ "strings"
+ "testing"
+ "time"
+)
+
+import (
+ "github.com/stretchr/testify/assert"
+)
+
+type _testMetric struct {
+ buf []byte
+}
+
+func (tt *_testMetric) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
+
+ tt.buf, _ = ioutil.ReadAll(request.Body)
+ //fmt.Printf("read (%d, content-length: %d) => %s\n", len(tt.buf), request.ContentLength, tt.buf)
+ writer.WriteHeader(200)
+}
+
+func TestLocal(t *testing.T) {
+ metricServer := &_testMetric{
+ buf: make([]byte, 204800),
+ }
+ go http.ListenAndServe(":9091", metricServer)
+
+ verify(t, "http://localhost:8888/health", http.StatusOK)
+ assert.True(t, strings.Contains(string(metricServer.buf), "pixiu_requests_total"))
+ metricServer.buf = metricServer.buf[0:0]
+
+ s := verify(t, "http://localhost:8888/user", http.StatusOK)
+ assert.True(t, strings.Contains(s, "user"))
+ assert.True(t, strings.Contains(string(metricServer.buf), "pixiu_requests_total"))
+ metricServer.buf = metricServer.buf[0:0]
+
+ s = verify(t, "http://localhost:8888/user/pixiu", http.StatusOK)
+ assert.True(t, strings.Contains(s, "pixiu"))
+ assert.True(t, strings.Contains(string(metricServer.buf), "pixiu_requests_total"))
+ metricServer.buf = metricServer.buf[0:0]
+
+ s = verify(t, "http://localhost:8888/prefix", http.StatusOK)
+ assert.True(t, strings.Contains(s, "prefix"))
+ assert.True(t, strings.Contains(string(metricServer.buf), "pixiu_requests_total"))
+ metricServer.buf = metricServer.buf[0:0]
+}
+
+func verify(t *testing.T, url string, status int) string {
+ client := &http.Client{Timeout: 5 * time.Second}
+ req, err := http.NewRequest(http.MethodGet, url, nil)
+ assert.NoError(t, err)
+ resp, err := client.Do(req)
+ assert.NoError(t, err)
+ assert.Equal(t, status, resp.StatusCode)
+ assert.NotNil(t, resp)
+ s, _ := ioutil.ReadAll(resp.Body)
+ t.Log(string(s))
+ return string(s)
+}
diff --git a/go.mod b/go.mod
index 8354035..f91cbe2 100644
--- a/go.mod
+++ b/go.mod
@@ -4,8 +4,8 @@
require (
dubbo.apache.org/dubbo-go/v3 v3.0.2-0.20220519062747-f6405fa79d5c
- github.com/apache/dubbo-go-hessian2 v1.11.1
- github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221008085317-b71ac6ee18d6
+ github.com/apache/dubbo-go-hessian2 v1.11.3
+ github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221031145428-b21979eeeb78
github.com/dubbogo/gost v1.11.25
github.com/dubbogo/grpc-go v1.42.9
github.com/dubbogo/triple v1.1.8
diff --git a/go.sum b/go.sum
index 2498a28..ed93893 100644
--- a/go.sum
+++ b/go.sum
@@ -278,10 +278,10 @@
github.com/apache/dubbo-go-hessian2 v1.9.1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
github.com/apache/dubbo-go-hessian2 v1.9.3/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
github.com/apache/dubbo-go-hessian2 v1.11.0/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w=
-github.com/apache/dubbo-go-hessian2 v1.11.1 h1:03xs4QCAZHY/gHCOWgOmIUW6Yc842FCLz4R0hxCzPr8=
-github.com/apache/dubbo-go-hessian2 v1.11.1/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w=
-github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221008085317-b71ac6ee18d6 h1:2fc1sYfiw1noG6vEDbzOPqRvgld78uKbFeFsnio2jR4=
-github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221008085317-b71ac6ee18d6/go.mod h1:G0HfiV3GwAGQdH+jvlJ4iXq738lNL+F0vfAp1RA0It8=
+github.com/apache/dubbo-go-hessian2 v1.11.3 h1:QSJhGLHBtnvb2kKrZ4uxpXxHGgGHqQkXXLI8rcQmEpg=
+github.com/apache/dubbo-go-hessian2 v1.11.3/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w=
+github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221031145428-b21979eeeb78 h1:mIw1I1n/CXb/+/lxek4KdnXpUjIXpPIcHWvKJVCKCDs=
+github.com/apache/dubbo-go-pixiu v0.5.0-rc01.0.20221031145428-b21979eeeb78/go.mod h1:C3iTZ0idmocIckx9LfFwYfwMZ2++tJZMKqzK3oyjNWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ=
@@ -1296,6 +1296,7 @@
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
+github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
@@ -2184,8 +2185,9 @@
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
-github.com/wasmerio/wasmer-go v1.0.3 h1:9pWIlIqUKxALvFlWK8+Zy90qyqxd+8wlyVG91txh1TU=
github.com/wasmerio/wasmer-go v1.0.3/go.mod h1:0gzVdSfg6pysA6QVp6iVRPTagC6Wq9pOE8J86WKb2Fk=
+github.com/wasmerio/wasmer-go v1.0.4 h1:MnqHoOGfiQ8MMq2RF6wyCeebKOe84G88h5yv+vmxJgs=
+github.com/wasmerio/wasmer-go v1.0.4/go.mod h1:0gzVdSfg6pysA6QVp6iVRPTagC6Wq9pOE8J86WKb2Fk=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=
diff --git a/xds/dubbo-go-istio/server/go.mod b/xds/dubbo-go-istio/server/go.mod
index d8e8f1a..6c1be2a 100644
--- a/xds/dubbo-go-istio/server/go.mod
+++ b/xds/dubbo-go-istio/server/go.mod
@@ -119,8 +119,8 @@
golang.org/x/net v0.0.0-20211105192438-b53810dc28af // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
- golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
- golang.org/x/text v0.3.6 // indirect
+ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
+ golang.org/x/text v0.3.8 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
google.golang.org/grpc v1.45.0 // indirect
diff --git a/xds/dubbo-go-istio/server/go.sum b/xds/dubbo-go-istio/server/go.sum
index 9e314f9..54eaea8 100644
--- a/xds/dubbo-go-istio/server/go.sum
+++ b/xds/dubbo-go-istio/server/go.sum
@@ -838,6 +838,7 @@
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ=
github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
@@ -935,6 +936,8 @@
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -972,6 +975,7 @@
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1024,6 +1028,8 @@
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211105192438-b53810dc28af h1:SMeNJG/vclJ5wyBBd4xupMsSJIHTd1coW9g7q6KOjmY=
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1044,6 +1050,8 @@
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1116,10 +1124,14 @@
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1128,8 +1140,10 @@
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
+golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1196,6 +1210,7 @@
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=