Skip to content

Commit

Permalink
Refactor remove third plugin (#756)
Browse files Browse the repository at this point in the history
* fix issue #629 (#693)

* docs:优化错误信息描述

* Update zh.toml

* fix:修复eureka心跳协议错误码不兼容问题

* fix:修复eureka心跳协议错误码不兼容问题

* unit:添加单元测试

* test:调整测试配置文件位置

* fix:issue #692

* fix:issue #692

* fix:issue #692

* fix:issue #692

* docs:add error code desc

* stash:save code

* stash:save code

* refactor:remove third plugin
  • Loading branch information
chuntaojun committed Oct 19, 2022
1 parent 83c810b commit 1380132
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 2,417 deletions.
2 changes: 1 addition & 1 deletion common/model/naming.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ const (
// EventDiscoverNone empty discover event
EventDiscoverNone DiscoverEventType = "EventDiscoverNone"
// EventInstanceOnline instance becoming online
EventInstanceOnline DiscoverEventType = "EventInstanceOnline"
EventInstanceOnline DiscoverEventType = "InstanceOnline"
// EventInstanceTurnUnHealth Instance becomes unhealthy
EventInstanceTurnUnHealth DiscoverEventType = "InstanceTurnUnHealth"
// EventInstanceTurnHealth Instance becomes healthy
Expand Down
34 changes: 17 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
bou.ke/monkey v1.0.2
github.com/BurntSushi/toml v1.0.0
github.com/BurntSushi/toml v1.2.0
github.com/boltdb/bolt v1.3.1
github.com/emicklei/go-restful/v3 v3.9.0
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1
Expand All @@ -14,12 +14,10 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.4
github.com/google/uuid v1.3.0
github.com/grafana/loki v1.6.1
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v0.5.4
github.com/json-iterator/go v1.1.12
github.com/json-iterator/go v1.1.12 // indirect
github.com/mitchellh/mapstructure v1.4.3
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/nicksnyder/go-i18n/v2 v2.2.0
Expand All @@ -28,25 +26,29 @@ require (
github.com/prometheus/client_golang v1.12.2
github.com/smartystreets/goconvey v1.6.4
github.com/spf13/cobra v1.2.1
github.com/stretchr/testify v1.7.0
go.uber.org/atomic v1.9.0
github.com/stretchr/testify v1.8.0
go.uber.org/atomic v1.10.0
go.uber.org/automaxprocs v1.4.0
go.uber.org/zap v1.19.1
go.uber.org/zap v1.23.0
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
golang.org/x/net v0.0.0-20220630215102-69896b714898
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/text v0.3.7
golang.org/x/text v0.3.8
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
google.golang.org/grpc v1.49.0
google.golang.org/protobuf v1.28.0
google.golang.org/grpc v1.50.1
google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/google/go-cmp v0.5.8 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)

// Indirect dependencies group
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -55,7 +57,6 @@ require (
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
Expand All @@ -69,13 +70,12 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852 // indirect
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect
google.golang.org/genproto v0.0.0-20220630174209-ad1d48641aa7 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
1,057 changes: 30 additions & 1,027 deletions go.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions import-format.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

# 格式化 go.mod
go mod tidy -compat=1.17


# 处理 go imports 的格式化
rm -rf style_tool
rm -rf goimports-reviser

Expand All @@ -15,4 +20,5 @@ cd ../

find . -name "*.go" -type f | grep -v .pb.go|grep -v test/tools/tools.go | grep -v ./plugin.go | xargs -I {} goimports-reviser -rm-unused -format {} -project-name github.com/polarismesh/polaris

# 处理 go 代码格式化
go fmt ./...
2 changes: 0 additions & 2 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ import (
_ "github.com/polarismesh/polaris/plugin/auth/platform"
_ "github.com/polarismesh/polaris/plugin/cmdb/memory"
_ "github.com/polarismesh/polaris/plugin/discoverevent/local"
_ "github.com/polarismesh/polaris/plugin/discoverevent/loki"
_ "github.com/polarismesh/polaris/plugin/discoverstat/discoverlocal"
_ "github.com/polarismesh/polaris/plugin/healthchecker/heartbeatmemory"
_ "github.com/polarismesh/polaris/plugin/healthchecker/heartbeatredis"
_ "github.com/polarismesh/polaris/plugin/history/logger"
_ "github.com/polarismesh/polaris/plugin/history/loki"
_ "github.com/polarismesh/polaris/plugin/password"
_ "github.com/polarismesh/polaris/plugin/ratelimit/lrurate"
_ "github.com/polarismesh/polaris/plugin/ratelimit/token"
Expand Down
76 changes: 0 additions & 76 deletions plugin/discoverevent/loki/README.md

This file was deleted.

120 changes: 0 additions & 120 deletions plugin/discoverevent/loki/event_loki.go

This file was deleted.

Loading

0 comments on commit 1380132

Please sign in to comment.