diff --git a/auth/simple/simple.go b/auth/simple/simple.go index 576247488..453bd86b3 100644 --- a/auth/simple/simple.go +++ b/auth/simple/simple.go @@ -40,14 +40,14 @@ func (b *BasicAuth) UnaryInterceptor(ctx context.Context, req interface{}, info func (b *BasicAuth) doAuth(ctx context.Context) error { meta, ok := metadata.FromIncomingContext(ctx) if !ok { - return types.ErrBadMeta + return types.ErrInvaildGRPCRequestMeta } passwords, ok := meta[b.username] if !ok { - return types.ErrInvaildUsername + return types.ErrInvaildGRPCUsername } if len(passwords) < 1 || passwords[0] != b.password { - return types.ErrInvaildPassword + return types.ErrInvaildGRPCPassword } return nil } diff --git a/client/clientpool.go b/client/clientpool.go index 05fe6d127..7cd9c48d8 100644 --- a/client/clientpool.go +++ b/client/clientpool.go @@ -32,7 +32,7 @@ type Pool struct { // NewCoreRPCClientPool . func NewCoreRPCClientPool(ctx context.Context, config *PoolConfig) (*Pool, error) { if len(config.EruAddrs) == 0 { - return nil, types.ErrBadIPAddress + return nil, types.ErrInvaildEruIPAddress } c := &Pool{rpcClients: []*clientWithStatus{}} for _, addr := range config.EruAddrs { diff --git a/cluster/calcium/build.go b/cluster/calcium/build.go index 180f0a733..51639bf4b 100644 --- a/cluster/calcium/build.go +++ b/cluster/calcium/build.go @@ -9,7 +9,7 @@ import ( "os" "time" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" enginetypes "github.com/projecteru2/core/engine/types" "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" @@ -21,8 +21,7 @@ func (c *Calcium) BuildImage(ctx context.Context, opts *types.BuildOptions) (ch logger := log.WithField("Calcium", "BuildImage").WithField("opts", opts) // Disable build API if scm not set if c.source == nil { - logger.Error(ctx, types.ErrSCMNotSet) - return nil, types.ErrSCMNotSet + return nil, types.ErrNoSCMSetting } // select nodes node, err := c.selectBuildNode(ctx) @@ -45,8 +44,7 @@ func (c *Calcium) BuildImage(ctx context.Context, opts *types.BuildOptions) (ch case types.BuildFromExist: refs, node, resp, err = c.buildFromExist(ctx, opts) default: - logger.Error(ctx, types.ErrUnknownBuildType) - return nil, types.ErrUnknownBuildType + return nil, types.ErrInvaildBuildType } if err != nil { logger.Error(ctx, err) @@ -71,7 +69,7 @@ func (c *Calcium) selectBuildNode(ctx context.Context) (*types.Node, error) { } if len(nodes) == 0 { - return nil, types.ErrInsufficientNodes + return nil, types.ErrInsufficientCapacity } // get idle max node return c.getMostIdleNode(ctx, nodes) diff --git a/cluster/calcium/build_test.go b/cluster/calcium/build_test.go index f33161a1f..88fdea2ce 100644 --- a/cluster/calcium/build_test.go +++ b/cluster/calcium/build_test.go @@ -64,7 +64,7 @@ func TestBuild(t *testing.T) { c.config.Docker.BuildPod = "test" // failed by ListPodNodes failed store := c.store.(*storemocks.Store) - store.On("GetNodesByPod", mock.Anything, mock.Anything).Return(nil, types.ErrBadMeta).Once() + store.On("GetNodesByPod", mock.Anything, mock.Anything).Return(nil, types.ErrInvaildWorkloadMeta).Once() ch, err := c.BuildImage(ctx, opts) assert.Error(t, err) // failed by no nodes @@ -84,7 +84,7 @@ func TestBuild(t *testing.T) { // failed by plugin error rmgr := c.rmgr.(*resourcemocks.Manager) rmgr.On("GetNodeResourceInfo", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, nil, nil) - rmgr.On("GetMostIdleNode", mock.Anything, mock.Anything).Return("", types.ErrBadCount).Once() + rmgr.On("GetMostIdleNode", mock.Anything, mock.Anything).Return("", types.ErrInvaildCount).Once() ch, err = c.BuildImage(ctx, opts) assert.Error(t, err) rmgr.On("GetMostIdleNode", mock.Anything, mock.Anything).Return("test", nil) @@ -107,7 +107,7 @@ func TestBuild(t *testing.T) { buildImageRespReader2 := io.NopCloser(bytes.NewReader(buildImageResp2)) engine.On("BuildRefs", mock.Anything, mock.Anything, mock.Anything).Return([]string{"t1", "t2"}) // failed by build context - engine.On("BuildContent", mock.Anything, mock.Anything, mock.Anything).Return("", nil, types.ErrBadCount).Once() + engine.On("BuildContent", mock.Anything, mock.Anything, mock.Anything).Return("", nil, types.ErrInvaildCount).Once() ch, err = c.BuildImage(ctx, opts) assert.Error(t, err) b := io.NopCloser(bytes.NewReader([]byte{})) diff --git a/cluster/calcium/capacity.go b/cluster/calcium/capacity.go index fe1125bfd..f2d0e803e 100644 --- a/cluster/calcium/capacity.go +++ b/cluster/calcium/capacity.go @@ -10,7 +10,7 @@ import ( "github.com/sanity-io/litter" "golang.org/x/exp/maps" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // CalculateCapacity calculates capacity @@ -45,7 +45,7 @@ func (c *Calcium) CalculateCapacity(ctx context.Context, opts *types.DeployOptio return err } if msg.Total <= 0 { - return errors.Wrap(types.ErrInsufficientRes, "no node meets all the resource requirements at the same time") + return errors.Wrap(types.ErrInsufficientResource, "no node meets all the resource requirements at the same time") } for node, info := range infos { msg.NodeCapacities[node] = info.Capacity diff --git a/cluster/calcium/control.go b/cluster/calcium/control.go index d6c30517c..b9a38869c 100644 --- a/cluster/calcium/control.go +++ b/cluster/calcium/control.go @@ -44,7 +44,7 @@ func (c *Calcium) ControlWorkload(ctx context.Context, ids []string, t string, f message = append(message, startHook...) return err } - return types.ErrUnknownControlType + return types.ErrInvaildControlType }) if err == nil { logger.Infof(ctx, "[ControlWorkload] Workload %s %s", id, t) diff --git a/cluster/calcium/create.go b/cluster/calcium/create.go index 44a3fd027..5c37cf4b2 100644 --- a/cluster/calcium/create.go +++ b/cluster/calcium/create.go @@ -26,12 +26,11 @@ func (c *Calcium) CreateWorkload(ctx context.Context, opts *types.DeployOptions) logger.Error(ctx, err) return nil, err } - opts.ProcessIdent = utils.RandomString(16) logger.Infof(ctx, "[CreateWorkload %s] Creating workload with options:\n%s", opts.ProcessIdent, litter.Options{Compact: true}.Sdump(opts)) // Count 要大于0 if opts.Count <= 0 { - err := types.NewDetailedErr(types.ErrBadCount, opts.Count) + err := types.NewDetailedErr(types.ErrInvaildCount, opts.Count) logger.Error(ctx, err) return nil, err } diff --git a/cluster/calcium/create_test.go b/cluster/calcium/create_test.go index 4c52af8b7..8cf6b8551 100644 --- a/cluster/calcium/create_test.go +++ b/cluster/calcium/create_test.go @@ -136,7 +136,7 @@ func TestCreateWorkloadTxn(t *testing.T) { // doAllocResource fails: Alloc rmgr.On("Alloc", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return( - nil, nil, types.ErrBadCPU, + nil, nil, types.ErrInvalidType, ).Once() ch, err = c.CreateWorkload(ctx, opts) assert.Nil(t, err) diff --git a/cluster/calcium/execute_test.go b/cluster/calcium/execute_test.go index 59c0997df..b72000fe9 100644 --- a/cluster/calcium/execute_test.go +++ b/cluster/calcium/execute_test.go @@ -29,7 +29,7 @@ func TestExecuteWorkload(t *testing.T) { store := c.store.(*storemocks.Store) // failed by GetWorkload - store.On("GetWorkload", mock.Anything, mock.Anything).Return(nil, types.ErrBadCount).Once() + store.On("GetWorkload", mock.Anything, mock.Anything).Return(nil, types.ErrInvaildCount).Once() ID := "abc" ch := c.ExecuteWorkload(ctx, &types.ExecuteWorkloadOptions{WorkloadID: ID}, nil) for ac := range ch { diff --git a/cluster/calcium/log_test.go b/cluster/calcium/log_test.go index ad859a300..68afcd8a7 100644 --- a/cluster/calcium/log_test.go +++ b/cluster/calcium/log_test.go @@ -35,7 +35,7 @@ func TestLogStream(t *testing.T) { } store.On("GetWorkload", mock.Anything, mock.Anything).Return(workload, nil) // failed by VirtualizationLogs - engine.On("VirtualizationLogs", mock.Anything, mock.Anything).Return(nil, nil, types.ErrNodeExist).Once() + engine.On("VirtualizationLogs", mock.Anything, mock.Anything).Return(nil, nil, types.ErrInvalidType).Once() ch, err = c.LogStream(ctx, opts) assert.NoError(t, err) for c := range ch { diff --git a/cluster/calcium/replace.go b/cluster/calcium/replace.go index eab7c805b..64a1aab5d 100644 --- a/cluster/calcium/replace.go +++ b/cluster/calcium/replace.go @@ -11,7 +11,7 @@ import ( "github.com/projecteru2/core/types" "github.com/projecteru2/core/utils" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // ReplaceWorkload replace workloads with same resource @@ -73,7 +73,7 @@ func (c *Calcium) ReplaceWorkload(ctx context.Context, opts *types.ReplaceOption if err != nil { return err } else if !info.Running { - return types.NewDetailedErr(types.ErrNotSupport, + return types.NewDetailedErr(types.ErrInvaildWorkloadOps, fmt.Sprintf("workload %s is not running, can not inherit", workload.ID), ) } @@ -114,7 +114,7 @@ func (c *Calcium) doReplaceWorkload( } // label filter if !utils.LabelsFilter(workload.Labels, opts.FilterLabels) { - return nil, removeMessage, types.ErrNotFitLabels + return nil, removeMessage, types.ErrWorkloadIgnored } // prepare node node, err := c.doGetAndPrepareNode(ctx, workload.Nodename, opts.Image) diff --git a/cluster/calcium/replace_test.go b/cluster/calcium/replace_test.go index 7c739e68c..c7d0ecc62 100644 --- a/cluster/calcium/replace_test.go +++ b/cluster/calcium/replace_test.go @@ -143,7 +143,7 @@ func TestReplaceWorkload(t *testing.T) { store.On("GetNode", mock.Anything, mock.Anything).Return(node, nil) // failed by VirtualizationCopyFrom opts.Copy = map[string]string{"src": "dst"} - engine.On("VirtualizationCopyFrom", mock.Anything, mock.Anything, mock.Anything).Return(nil, 0, 0, int64(0), types.ErrBadWorkloadID).Once() + engine.On("VirtualizationCopyFrom", mock.Anything, mock.Anything, mock.Anything).Return(nil, 0, 0, int64(0), types.ErrInvalidType).Once() ch, err = c.ReplaceWorkload(ctx, opts) assert.NoError(t, err) for r := range ch { diff --git a/cluster/calcium/service.go b/cluster/calcium/service.go index 108996762..31b58c0f5 100644 --- a/cluster/calcium/service.go +++ b/cluster/calcium/service.go @@ -9,7 +9,7 @@ import ( "github.com/projecteru2/core/types" "github.com/projecteru2/core/utils" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // WatchServiceStatus returns chan of available service address diff --git a/cluster/calcium/stream.go b/cluster/calcium/stream.go index 3aa855e04..a21fcb735 100644 --- a/cluster/calcium/stream.go +++ b/cluster/calcium/stream.go @@ -7,7 +7,7 @@ import ( "io" "sync" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/engine" enginetypes "github.com/projecteru2/core/engine/types" "github.com/projecteru2/core/log" diff --git a/cluster/calcium/wal.go b/cluster/calcium/wal.go index 888130c36..ef33c2873 100644 --- a/cluster/calcium/wal.go +++ b/cluster/calcium/wal.go @@ -6,8 +6,8 @@ import ( "sync" "time" + "github.com/cockroachdb/errors" "github.com/panjf2000/ants/v2" - "github.com/pkg/errors" "github.com/projecteru2/core/cluster" "github.com/projecteru2/core/log" "github.com/projecteru2/core/store" diff --git a/cluster/calcium/wal_test.go b/cluster/calcium/wal_test.go index ceebea58e..2f16c26de 100644 --- a/cluster/calcium/wal_test.go +++ b/cluster/calcium/wal_test.go @@ -79,7 +79,7 @@ func TestHandleCreateWorkloadError(t *testing.T) { store := c.store.(*storemocks.Store) - err = types.NewDetailedErr(types.ErrBadCount, fmt.Sprintf("keys: [%s]", wrkid)) + err = types.NewDetailedErr(types.ErrInvaildCount, fmt.Sprintf("keys: [%s]", wrkid)) store.On("GetWorkload", mock.Anything, mock.Anything).Return(wrk, err).Once() store.On("GetNode", mock.Anything, mock.Anything).Return(nil, err).Once() c.wal.Recover(context.TODO()) @@ -133,7 +133,7 @@ func TestHandleCreateWorkloadHandled(t *testing.T) { } store := c.store.(*storemocks.Store) - err = types.NewDetailedErr(types.ErrBadCount, fmt.Sprintf("keys: [%s]", wrkid)) + err = types.NewDetailedErr(types.ErrInvaildCount, fmt.Sprintf("keys: [%s]", wrkid)) store.On("GetWorkload", mock.Anything, wrkid).Return(nil, err).Once() store.On("GetNode", mock.Anything, wrk.Nodename).Return(node, nil) diff --git a/discovery/helium/helium.go b/discovery/helium/helium.go index 721530fc7..c6d56a81c 100644 --- a/discovery/helium/helium.go +++ b/discovery/helium/helium.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/store" "github.com/projecteru2/core/types" diff --git a/engine/docker/container.go b/engine/docker/container.go index aa7d38f4c..0f52e752d 100644 --- a/engine/docker/container.go +++ b/engine/docker/container.go @@ -89,7 +89,7 @@ func (e *Engine) VirtualizationCreate(ctx context.Context, opts *enginetypes.Vir // memory should more than 4MiB if opts.Memory > 0 && opts.Memory < minMemory || opts.Memory < 0 { - return r, coretypes.ErrBadMemory + return r, coretypes.ErrInvaildMemory } // set default log driver if lambda if opts.Lambda { @@ -408,11 +408,11 @@ func (e *Engine) VirtualizationUpdateResource(ctx context.Context, ID string, op } if resourceOpts.Memory > 0 && resourceOpts.Memory < minMemory || resourceOpts.Memory < 0 { - return coretypes.ErrBadMemory + return coretypes.ErrInvaildMemory } if len(opts.Volumes) > 0 || resourceOpts.VolumeChanged { log.Errorf(ctx, err, "[VirtualizationUpdateResource] docker engine not support rebinding volume resource: %+v", resourceOpts.Volumes) - return coretypes.ErrNotSupport + return coretypes.ErrInvaildWorkloadOps } memory := resourceOpts.Memory diff --git a/engine/docker/network.go b/engine/docker/network.go index 5e45f90f2..64bad2834 100644 --- a/engine/docker/network.go +++ b/engine/docker/network.go @@ -69,7 +69,7 @@ func (e *Engine) makeIPV4EndpointSetting(ipv4 string) (*dockernetwork.EndpointSe if ipv4 != "" { ip := net.ParseIP(ipv4) if ip == nil { - return nil, coretypes.NewDetailedErr(coretypes.ErrBadIPAddress, ipv4) + return nil, coretypes.NewDetailedErr(coretypes.ErrInvaildIPAddress, ipv4) } config.IPAMConfig.IPv4Address = ip.String() } diff --git a/engine/factory/factory.go b/engine/factory/factory.go index 736ead567..db259a62b 100644 --- a/engine/factory/factory.go +++ b/engine/factory/factory.go @@ -192,7 +192,7 @@ func getEnginePrefix(endpoint string) (string, error) { return prefix, nil } } - return "", types.NewDetailedErr(types.ErrNodeFormat, fmt.Sprintf("endpoint invalid %+v", endpoint)) + return "", types.NewDetailedErr(types.ErrInvaildNodeEndpoint, fmt.Sprintf("endpoint invalid %+v", endpoint)) } func getEngineCacheKey(endpoint, ca, cert, key string) string { @@ -207,7 +207,7 @@ func newEngine(ctx context.Context, config types.Config, nodename, endpoint, ca, } e, ok := engines[prefix] if !ok { - return nil, types.ErrNotSupport + return nil, types.ErrNotSupportEndpoint } utils.WithTimeout(ctx, config.ConnectionTimeout, func(ctx context.Context) { client, err = e(ctx, config, nodename, endpoint, ca, cert, key) diff --git a/engine/virt/helper.go b/engine/virt/helper.go index 22f52a4d7..bad02a7b0 100644 --- a/engine/virt/helper.go +++ b/engine/virt/helper.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" coretypes "github.com/projecteru2/core/types" ) @@ -19,7 +19,7 @@ func (v *Virt) parseVolumes(volumes []string) ([]string, error) { for _, bind := range volumes { parts := strings.Split(bind, ":") if len(parts) != 4 && len(parts) != 8 { - return nil, coretypes.NewDetailedErr(coretypes.ErrInvalidBind, bind) + return nil, coretypes.NewDetailedErr(coretypes.ErrInvalidVolumeBind, bind) } src := parts[0] diff --git a/engine/virt/image.go b/engine/virt/image.go index b219701cb..5962f98fc 100644 --- a/engine/virt/image.go +++ b/engine/virt/image.go @@ -102,7 +102,7 @@ func (v *Virt) ImageBuildFromExist(ctx context.Context, ID string, refs []string return "", types.ErrNoImageUser } if len(refs) != 1 { - return "", types.ErrBadRefs + return "", types.ErrInvaildRefs } _, imgName, err := splitUserImage(refs[0]) @@ -154,7 +154,7 @@ func (v *Virt) ImageRemoteDigest(ctx context.Context, image string) (string, err case err != nil: return "", err case len(digests) < 1: - return "", types.ErrNoRemoteDigest + return "", types.ErrInvaildRemoteDigest default: return digests[0], nil } diff --git a/engine/virt/virt.go b/engine/virt/virt.go index c905fba5c..481e8845b 100644 --- a/engine/virt/virt.go +++ b/engine/virt/virt.go @@ -49,7 +49,7 @@ func MakeClient(ctx context.Context, config coretypes.Config, nodename, endpoint case strings.HasPrefix(endpoint, GRPCPrefixKey): uri = "grpc://" + strings.TrimPrefix(endpoint, GRPCPrefixKey) default: - return nil, coretypes.ErrNotSupport + return nil, coretypes.ErrNotSupportEndpoint } cli, err := virtapi.New(uri) diff --git a/go.mod b/go.mod index f4c21e473..7ef40cfe0 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,13 @@ require ( github.com/CMGS/statsd v0.0.0-20160223095033-48c421b3c1ab github.com/alicebob/miniredis/v2 v2.14.3 github.com/cenkalti/backoff/v4 v4.1.1 + github.com/cockroachdb/errors v1.9.0 github.com/cornelk/hashmap v1.0.9-0.20221102000129-36b3b9c2b7ec github.com/docker/distribution v2.8.0+incompatible github.com/docker/docker v20.10.0+incompatible github.com/docker/go-connections v0.4.0 github.com/docker/go-units v0.4.0 - github.com/getsentry/sentry-go v0.9.0 + github.com/getsentry/sentry-go v0.12.0 github.com/go-git/go-git/v5 v5.2.0 github.com/go-ping/ping v0.0.0-20210407214646-e4e642a95741 github.com/go-redis/redis/v8 v8.8.2 @@ -53,6 +54,8 @@ require ( github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect + github.com/cockroachdb/redact v1.1.3 // indirect github.com/containerd/cgroups v1.0.3 // indirect github.com/containerd/containerd v1.5.13 // indirect github.com/containerd/continuity v0.1.0 // indirect @@ -84,6 +87,8 @@ require ( github.com/json-iterator/go v1.1.11 // indirect github.com/juju/errors v0.0.0-20220331221717-b38fca44723b // indirect github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect + github.com/kr/pretty v0.3.0 // indirect + github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect @@ -100,6 +105,7 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.26.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect + github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect @@ -136,7 +142,7 @@ require ( golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect + google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index e84d5fb90..a6a9a6fb0 100644 --- a/go.sum +++ b/go.sum @@ -21,9 +21,12 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CMGS/statsd v0.0.0-20160223095033-48c421b3c1ab h1:/Nl282MSyyUKtYA9gAUF5mlIIdkLkNOBIbE5n9xOxU4= github.com/CMGS/statsd v0.0.0-20160223095033-48c421b3c1ab/go.mod h1:GJO3SGuPXm9A2hpQVV7/wlPr8oP9xxQluI8y99gQu60= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/hcsshim v0.8.24 h1:jP+GMeRXIR1sH1kG4lJr9ShmSjVrua5jmFZDtfYGkn4= @@ -66,7 +69,6 @@ github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1P github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -81,12 +83,21 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= +github.com/cockroachdb/datadriven v1.0.1-0.20211007161720-b558070c3be0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/datadriven v1.0.1-0.20220214170620-9913f5bc19b7 h1:GCR5egmFNSTyGOv9IvMh636aELybEhZOlpPlW2NtuiU= +github.com/cockroachdb/datadriven v1.0.1-0.20220214170620-9913f5bc19b7/go.mod h1:hi0MtSY3AYDQNDi83kDkMH5/yqM/CsIrsOITkSoH7KI= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.8/go.mod h1:z6VnEL3hZ/2ONZEvG7S5Ym0bU2AqPcEKnIiA1wbsSu0= +github.com/cockroachdb/errors v1.9.0 h1:B48dYem5SlAY7iU8AKsgedb4gH6mo+bDkbtLIvM/a88= +github.com/cockroachdb/errors v1.9.0/go.mod h1:vaNcEYYqbIqB5JhKBhFV9CneUqeuEbB2OYJBK4GBNYQ= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= @@ -165,6 +176,7 @@ github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8 github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -173,10 +185,9 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/getsentry/sentry-go v0.9.0 h1:KIfpY/D9hX3gWAEd3d8z6ImuHNWtqEsjlpdF8zXFsHM= -github.com/getsentry/sentry-go v0.9.0/go.mod h1:kELm/9iCblqUYh+ZRML7PNdCvEuw24wBvJPYyi86cws= +github.com/getsentry/sentry-go v0.12.0 h1:era7g0re5iY13bHSdN/xMkyV+5zZppjRVQhZrXCaEIk= +github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= @@ -214,11 +225,16 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -309,6 +325,8 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -316,6 +334,7 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= @@ -336,14 +355,21 @@ github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMW github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/errors v0.0.0-20220331221717-b38fca44723b h1:AxFeSQJfcm2O3ov1wqAkTKYFsnMw2g1B4PkYujfAdkY= github.com/juju/errors v0.0.0-20220331221717-b38fca44723b/go.mod h1:jMGj9DWF/qbo91ODcfJq6z/RYc3FX3taCBZMCcpI4Ls= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= @@ -353,30 +379,36 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -384,6 +416,8 @@ github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpe github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -420,7 +454,9 @@ github.com/muroq/redislock v0.0.0-20210327061935-5425e33e6f9f/go.mod h1:1ghhEkSF github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -431,6 +467,7 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= @@ -458,6 +495,7 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -498,6 +536,9 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= @@ -509,6 +550,7 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo github.com/sanity-io/litter v1.5.1 h1:dwnrSypP6q56o3lFxTU+t2fwQ9A+U5qrXVO4Qg9KwVU= github.com/sanity-io/litter v1.5.1/go.mod h1:5Z71SvaYy5kcGtyglXOC9rrUi3c1E8CamFWjQsazTh0= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -569,6 +611,7 @@ github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKn github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= @@ -667,6 +710,7 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -729,7 +773,9 @@ golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -777,6 +823,8 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -794,13 +842,17 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= @@ -810,10 +862,12 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 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= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -847,6 +901,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 h1:0c3L82FDQ5rt1bjTBlchS8t6RQ6299/+5bWMnRLh+uI= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= @@ -865,6 +920,7 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -878,8 +934,10 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84 h1:R1r5J0u6Cx+RNl/6mezTw6oA14cmKC96FeUwL6A9bd4= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/lock/etcdlock/mutex.go b/lock/etcdlock/mutex.go index ba55de6cf..9a8bd955e 100644 --- a/lock/etcdlock/mutex.go +++ b/lock/etcdlock/mutex.go @@ -46,7 +46,7 @@ func (c *lockContext) Err() error { // New new a lock func New(cli *clientv3.Client, key string, ttl time.Duration) (*Mutex, error) { if key == "" { - return nil, types.ErrKeyIsEmpty + return nil, types.ErrLockKeyInvaild } if !strings.HasPrefix(key, "/") { diff --git a/lock/redis/lock.go b/lock/redis/lock.go index 7ca79ea76..fcd012ecc 100644 --- a/lock/redis/lock.go +++ b/lock/redis/lock.go @@ -28,7 +28,7 @@ type RedisLock struct { // lockTTL: ttl of lock, after this time, lock will be released automatically func New(cli redislock.RedisClient, key string, waitTimeout, lockTTL time.Duration) (*RedisLock, error) { if key == "" { - return nil, types.ErrKeyIsEmpty + return nil, types.ErrLockKeyInvaild } if !strings.HasPrefix(key, "/") { diff --git a/log/log.go b/log/log.go index 031eb66a8..97f021082 100644 --- a/log/log.go +++ b/log/log.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/types" "github.com/getsentry/sentry-go" diff --git a/resources/binary.go b/resources/binary.go index 1abc6b865..03008ce40 100644 --- a/resources/binary.go +++ b/resources/binary.go @@ -10,7 +10,7 @@ import ( "reflect" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" enginetypes "github.com/projecteru2/core/engine/types" "github.com/projecteru2/core/log" coretypes "github.com/projecteru2/core/types" diff --git a/resources/cpumem/models/alloc_test.go b/resources/cpumem/models/alloc_test.go index b8c0f5cd7..4cde6b889 100644 --- a/resources/cpumem/models/alloc_test.go +++ b/resources/cpumem/models/alloc_test.go @@ -31,7 +31,7 @@ func TestAlloc(t *testing.T) { CPUBind: true, CPURequest: 1, }) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) // cpu bind _, _, err = cpuMem.GetDeployArgs(ctx, node, 1, &types.WorkloadResourceOpts{ diff --git a/resources/cpumem/models/capacity_test.go b/resources/cpumem/models/capacity_test.go index 36cd49b95..6311a45c9 100644 --- a/resources/cpumem/models/capacity_test.go +++ b/resources/cpumem/models/capacity_test.go @@ -134,7 +134,7 @@ func TestGetNodesCapacityWithCPUBinding(t *testing.T) { CPURequest: 0.5, MemRequest: 1, }) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) _, total, err = cpuMem.GetNodesDeployCapacity(ctx, nodes, &types.WorkloadResourceOpts{ CPUBind: true, diff --git a/resources/cpumem/models/info_test.go b/resources/cpumem/models/info_test.go index 86103979d..4fc0dd753 100644 --- a/resources/cpumem/models/info_test.go +++ b/resources/cpumem/models/info_test.go @@ -21,7 +21,7 @@ func TestGetNodeResourceInfo(t *testing.T) { // invalid node _, _, err := cpuMem.GetNodeResourceInfo(ctx, "xxx", nil, false) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) resourceInfo, diffs, err := cpuMem.GetNodeResourceInfo(ctx, node, nil, false) assert.Nil(t, err) diff --git a/resources/cpumem/models/node.go b/resources/cpumem/models/node.go index 3e059fb5c..a550936b2 100644 --- a/resources/cpumem/models/node.go +++ b/resources/cpumem/models/node.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/resources/cpumem/types" coretypes "github.com/projecteru2/core/types" @@ -13,7 +13,7 @@ import ( // AddNode . func (c *CPUMem) AddNode(ctx context.Context, node string, resourceOpts *types.NodeResourceOpts) (*types.NodeResourceInfo, error) { if _, err := c.doGetNodeResourceInfo(ctx, node); err != nil { - if !errors.Is(err, coretypes.ErrBadCount) { + if !errors.Is(err, coretypes.ErrInvaildCount) { log.Errorf(ctx, err, "[AddNode] failed to get resource info of node %+v", node) return nil, err } diff --git a/resources/cpumem/models/node_test.go b/resources/cpumem/models/node_test.go index 64507874b..33c2a95db 100644 --- a/resources/cpumem/models/node_test.go +++ b/resources/cpumem/models/node_test.go @@ -58,7 +58,7 @@ func TestRemoveNode(t *testing.T) { assert.Nil(t, cpuMem.RemoveNode(ctx, nodes[0])) _, _, err := cpuMem.GetNodeResourceInfo(ctx, nodes[0], nil, false) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) assert.Nil(t, cpuMem.RemoveNode(ctx, "xxx")) } diff --git a/resources/cpumem/models/realloc_test.go b/resources/cpumem/models/realloc_test.go index 088c7c705..552374329 100644 --- a/resources/cpumem/models/realloc_test.go +++ b/resources/cpumem/models/realloc_test.go @@ -38,7 +38,7 @@ func TestRealloc(t *testing.T) { // non-existent node _, _, _, err = cpuMem.GetReallocArgs(ctx, "xxx", originResourceArgs, &types.WorkloadResourceOpts{}) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) // invalid resource opts opts := &types.WorkloadResourceOpts{ diff --git a/resources/cpumem/models/remap_test.go b/resources/cpumem/models/remap_test.go index 9d822cec8..17d2444d5 100644 --- a/resources/cpumem/models/remap_test.go +++ b/resources/cpumem/models/remap_test.go @@ -28,7 +28,7 @@ func TestRemap(t *testing.T) { // non-existent node _, err := cpuMem.GetRemapArgs(ctx, "xxx", nil) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) // normal case workloadResourceMap := &types.WorkloadResourceArgsMap{ diff --git a/resources/cpumem/types/errors.go b/resources/cpumem/types/errors.go index 61d107bea..b27cf80d4 100644 --- a/resources/cpumem/types/errors.go +++ b/resources/cpumem/types/errors.go @@ -1,6 +1,6 @@ package types -import "github.com/pkg/errors" +import "github.com/cockroachdb/errors" var ( ErrInvalidCapacity = errors.New("invalid resource capacity") diff --git a/resources/cpumem/types/resource.go b/resources/cpumem/types/resource.go index 7a60eb5f3..4cf4a18f6 100644 --- a/resources/cpumem/types/resource.go +++ b/resources/cpumem/types/resource.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" coretypes "github.com/projecteru2/core/types" coreutils "github.com/projecteru2/core/utils" diff --git a/resources/manager.go b/resources/manager.go index 6a076e4bc..91631cd24 100644 --- a/resources/manager.go +++ b/resources/manager.go @@ -4,7 +4,7 @@ import ( "context" "math" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" enginetypes "github.com/projecteru2/core/engine/types" "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" diff --git a/resources/volume/models/alloc.go b/resources/volume/models/alloc.go index 56884f40f..3cfe8b807 100644 --- a/resources/volume/models/alloc.go +++ b/resources/volume/models/alloc.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/resources/volume/schedule" diff --git a/resources/volume/models/alloc_test.go b/resources/volume/models/alloc_test.go index bf047eab2..f8c5eff24 100644 --- a/resources/volume/models/alloc_test.go +++ b/resources/volume/models/alloc_test.go @@ -32,7 +32,7 @@ func TestAlloc(t *testing.T) { }), } _, _, err = volume.GetDeployArgs(ctx, "fake-node", 1, resourceOpts) - assert.ErrorIs(t, err, coretypes.ErrBadCount) + assert.ErrorIs(t, err, coretypes.ErrInvaildCount) // storage is not enough resourceOpts = &types.WorkloadResourceOpts{ diff --git a/resources/volume/models/capacity_test.go b/resources/volume/models/capacity_test.go index c4e2b2415..e4992665f 100644 --- a/resources/volume/models/capacity_test.go +++ b/resources/volume/models/capacity_test.go @@ -30,7 +30,7 @@ func TestGetNodesDeployCapacity(t *testing.T) { StorageRequest: 1, } _, _, err = volume.GetNodesDeployCapacity(ctx, []string{"invalid"}, resourceOpts) - assert.ErrorIs(t, err, coretypes.ErrBadCount) + assert.ErrorIs(t, err, coretypes.ErrInvaildCount) // no volume request resourceOpts = &types.WorkloadResourceOpts{ diff --git a/resources/volume/models/info_test.go b/resources/volume/models/info_test.go index e051c3e2c..9b72fbf23 100644 --- a/resources/volume/models/info_test.go +++ b/resources/volume/models/info_test.go @@ -21,7 +21,7 @@ func TestGetNodeResourceInfo(t *testing.T) { // invalid node _, _, err := volume.GetNodeResourceInfo(ctx, "xxx", nil, false) - assert.True(t, errors.Is(err, coretypes.ErrBadCount)) + assert.True(t, errors.Is(err, coretypes.ErrInvaildCount)) // normal case resourceInfo, diffs, err := volume.GetNodeResourceInfo(ctx, node, nil, false) diff --git a/resources/volume/models/node.go b/resources/volume/models/node.go index 0f6086dde..4b38cc0c5 100644 --- a/resources/volume/models/node.go +++ b/resources/volume/models/node.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/resources/volume/types" @@ -14,7 +14,7 @@ import ( // AddNode . func (v *Volume) AddNode(ctx context.Context, node string, resourceOpts *types.NodeResourceOpts) (*types.NodeResourceInfo, error) { if _, err := v.doGetNodeResourceInfo(ctx, node); err != nil { - if !errors.Is(err, coretypes.ErrBadCount) { + if !errors.Is(err, coretypes.ErrInvaildCount) { log.Errorf(ctx, err, "[AddNode] failed to get resource info of node %+v", node) return nil, err } diff --git a/resources/volume/models/node_test.go b/resources/volume/models/node_test.go index 1cb2a2943..657ec23d7 100644 --- a/resources/volume/models/node_test.go +++ b/resources/volume/models/node_test.go @@ -42,7 +42,7 @@ func TestRemoveNode(t *testing.T) { assert.Nil(t, volume.RemoveNode(ctx, nodes[0])) _, _, err := volume.GetNodeResourceInfo(ctx, nodes[0], nil, false) - assert.ErrorIs(t, err, coretypes.ErrBadCount) + assert.ErrorIs(t, err, coretypes.ErrInvaildCount) assert.Nil(t, volume.RemoveNode(ctx, "invalid-node")) } diff --git a/resources/volume/models/realloc_test.go b/resources/volume/models/realloc_test.go index 404fb1fb3..847f04d2d 100644 --- a/resources/volume/models/realloc_test.go +++ b/resources/volume/models/realloc_test.go @@ -57,7 +57,7 @@ func TestRealloc(t *testing.T) { // non-existent node _, _, _, err = volume.GetReallocArgs(ctx, "invalid-node", originResourceArgs, &types.WorkloadResourceOpts{}) - assert.ErrorIs(t, err, coretypes.ErrBadCount) + assert.ErrorIs(t, err, coretypes.ErrInvaildCount) // invalid resource opts opts := &types.WorkloadResourceOpts{ diff --git a/resources/volume/schedule/schedule.go b/resources/volume/schedule/schedule.go index 09246da37..29befc327 100644 --- a/resources/volume/schedule/schedule.go +++ b/resources/volume/schedule/schedule.go @@ -5,7 +5,7 @@ import ( "math" "sort" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/resources/volume/types" diff --git a/resources/volume/types/errors.go b/resources/volume/types/errors.go index ed848a11b..ad64afdac 100644 --- a/resources/volume/types/errors.go +++ b/resources/volume/types/errors.go @@ -1,6 +1,6 @@ package types -import "github.com/pkg/errors" +import "github.com/cockroachdb/errors" var ( ErrInvalidCapacity = errors.New("invalid capacity") diff --git a/resources/volume/types/resource.go b/resources/volume/types/resource.go index 827c28eb6..09d141028 100644 --- a/resources/volume/types/resource.go +++ b/resources/volume/types/resource.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" coretypes "github.com/projecteru2/core/types" coreutils "github.com/projecteru2/core/utils" diff --git a/resources/volume/types/volume.go b/resources/volume/types/volume.go index 16c68c68f..96b3c2613 100644 --- a/resources/volume/types/volume.go +++ b/resources/volume/types/volume.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/utils" ) diff --git a/selfmon/selfmon.go b/selfmon/selfmon.go index 2be205c8e..1acfde20e 100644 --- a/selfmon/selfmon.go +++ b/selfmon/selfmon.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/cluster" "github.com/projecteru2/core/log" diff --git a/source/common/common.go b/source/common/common.go index 197d14ab8..b50e5c611 100644 --- a/source/common/common.go +++ b/source/common/common.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" @@ -71,7 +71,7 @@ func (g *GitScm) SourceCode(ctx context.Context, repository, path, revision stri opts.Auth = auth repo, err = gogit.PlainCloneContext(ctx, path, false, opts) default: - return types.ErrNotSupport + return types.ErrInvaildSCMType } if err != nil { return err diff --git a/store/etcdv3/meta/ephemeral.go b/store/etcdv3/meta/ephemeral.go index 317b96be5..0463537a6 100644 --- a/store/etcdv3/meta/ephemeral.go +++ b/store/etcdv3/meta/ephemeral.go @@ -8,7 +8,7 @@ import ( "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/store/etcdv3/meta/etcd.go b/store/etcdv3/meta/etcd.go index 2d68d735e..ec7110767 100644 --- a/store/etcdv3/meta/etcd.go +++ b/store/etcdv3/meta/etcd.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/projecteru2/core/lock" "github.com/projecteru2/core/lock/etcdlock" @@ -111,7 +111,7 @@ func (e *ETCD) GetOne(ctx context.Context, key string, opts ...clientv3.OpOption return nil, err } if resp.Count != 1 { - return nil, types.NewDetailedErr(types.ErrBadCount, fmt.Sprintf("key: %s", key)) + return nil, types.NewDetailedErr(types.ErrInvaildCount, fmt.Sprintf("key: %s", key)) } return resp.Kvs[0], nil } @@ -128,12 +128,12 @@ func (e *ETCD) GetMulti(ctx context.Context, keys []string, opts ...clientv3.OpO for idx, responseOp := range txnResponse.Responses { resp := responseOp.GetResponseRange() if resp.Count != 1 { - return nil, types.NewDetailedErr(types.ErrBadCount, fmt.Sprintf("key: %s", keys[idx])) + return nil, types.NewDetailedErr(types.ErrInvaildCount, fmt.Sprintf("key: %s", keys[idx])) } kvs = append(kvs, resp.Kvs[0]) } if len(kvs) != len(keys) { - err = types.NewDetailedErr(types.ErrBadCount, fmt.Sprintf("keys: %+v", keys)) + err = types.NewDetailedErr(types.ErrInvaildCount, fmt.Sprintf("keys: %+v", keys)) } return } @@ -250,7 +250,7 @@ func (e *ETCD) BatchPut(ctx context.Context, data map[string]string, opts ...cli func (e *ETCD) isTTLChanged(ctx context.Context, key string, ttl int64) (bool, error) { resp, err := e.GetOne(ctx, key) if err != nil { - if errors.Is(err, types.ErrBadCount) { + if errors.Is(err, types.ErrInvaildCount) { return ttl != 0, nil } return false, err diff --git a/store/etcdv3/node.go b/store/etcdv3/node.go index 6bacaf17f..ae87c3a6f 100644 --- a/store/etcdv3/node.go +++ b/store/etcdv3/node.go @@ -8,7 +8,7 @@ import ( "strings" "sync" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" @@ -133,7 +133,7 @@ func (m *Mercury) UpdateNodes(ctx context.Context, nodes ...*types.Node) error { // this is heartbeat of node func (m *Mercury) SetNodeStatus(ctx context.Context, node *types.Node, ttl int64) error { if ttl == 0 { - return types.ErrNodeStatusTTL + return types.ErrInvaildNodeStatusTTL } // nodenames are unique @@ -222,7 +222,7 @@ func (m *Mercury) makeClient(ctx context.Context, node *types.Node) (client engi for i := 0; i < 3; i++ { ev, err := m.GetOne(ctx, fmt.Sprintf(keyFormats[i], node.Name)) if err != nil { - if !errors.Is(err, types.ErrBadCount) { + if !errors.Is(err, types.ErrInvaildCount) { log.Warnf(ctx, "[makeClient] Get key failed %+v", err) return nil, err } @@ -317,7 +317,7 @@ func (m *Mercury) doGetNodes(ctx context.Context, kvs []*mvccpb.KeyValue, labels node := node _ = m.pool.Invoke(func() { defer wg.Done() - if _, err := m.GetNodeStatus(ctx, node.Name); err != nil && !errors.Is(err, types.ErrBadCount) { + if _, err := m.GetNodeStatus(ctx, node.Name); err != nil && !errors.Is(err, types.ErrInvaildCount) { log.Errorf(ctx, err, "[doGetNodes] failed to get node status of %+v", node.Name) } else { node.Available = err == nil diff --git a/store/etcdv3/workload.go b/store/etcdv3/workload.go index bd6950efd..da27f18f9 100644 --- a/store/etcdv3/workload.go +++ b/store/etcdv3/workload.go @@ -67,7 +67,7 @@ func (m *Mercury) GetWorkloadStatus(ctx context.Context, id string) (*types.Stat // SetWorkloadStatus set workload status func (m *Mercury) SetWorkloadStatus(ctx context.Context, status *types.StatusMeta, ttl int64) error { if status.Appname == "" || status.Entrypoint == "" || status.Nodename == "" { - return types.ErrBadWorkloadStatus + return types.ErrInvaildWorkloadStatus } data, err := json.Marshal(status) @@ -236,7 +236,7 @@ func (m *Mercury) bindWorkloadsAdditions(ctx context.Context, workloads []*types for index, workload := range workloads { if _, ok := nodes[workload.Nodename]; !ok { - return nil, types.ErrBadMeta + return nil, types.ErrInvaildWorkloadMeta } workloads[index].Engine = nodes[workload.Nodename].Engine if _, ok := statusKeys[workload.ID]; !ok { diff --git a/store/redis/ephemeral.go b/store/redis/ephemeral.go index 4f71a8d20..61cf6b63e 100644 --- a/store/redis/ephemeral.go +++ b/store/redis/ephemeral.go @@ -8,7 +8,7 @@ import ( "github.com/projecteru2/core/log" "github.com/projecteru2/core/types" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) var ephemeralValue = "__aaron__" diff --git a/store/redis/node.go b/store/redis/node.go index 5326fadc8..db9067902 100644 --- a/store/redis/node.go +++ b/store/redis/node.go @@ -16,7 +16,7 @@ import ( "github.com/projecteru2/core/types" "github.com/projecteru2/core/utils" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // AddNode save it to etcd @@ -124,7 +124,7 @@ func (r *Rediaron) UpdateNodes(ctx context.Context, nodes ...*types.Node) error // this is heartbeat of node func (r *Rediaron) SetNodeStatus(ctx context.Context, node *types.Node, ttl int64) error { if ttl == 0 { - return types.ErrNodeStatusTTL + return types.ErrInvaildNodeStatusTTL } // nodenames are unique @@ -300,7 +300,7 @@ func (r *Rediaron) doGetNodes(ctx context.Context, kvs map[string]string, labels node := node _ = r.pool.Invoke(func() { defer wg.Done() - if _, err := r.GetNodeStatus(ctx, node.Name); err != nil && !errors.Is(err, types.ErrBadCount) { + if _, err := r.GetNodeStatus(ctx, node.Name); err != nil && !errors.Is(err, types.ErrInvaildCount) { log.Errorf(ctx, err, "[doGetNodes] failed to get node status of %+v", node.Name) } else { node.Available = err == nil diff --git a/store/redis/rediaron.go b/store/redis/rediaron.go index 0169f03ab..0b91d8b0a 100644 --- a/store/redis/rediaron.go +++ b/store/redis/rediaron.go @@ -12,8 +12,8 @@ import ( "github.com/projecteru2/core/types" "github.com/projecteru2/core/utils" + "github.com/cockroachdb/errors" "github.com/go-redis/redis/v8" - "github.com/pkg/errors" ) var ( diff --git a/store/redis/workload.go b/store/redis/workload.go index 8de34c34d..d6049378c 100644 --- a/store/redis/workload.go +++ b/store/redis/workload.go @@ -64,7 +64,7 @@ func (r *Rediaron) GetWorkloadStatus(ctx context.Context, id string) (*types.Sta // SetWorkloadStatus set workload status func (r *Rediaron) SetWorkloadStatus(ctx context.Context, status *types.StatusMeta, ttl int64) error { if status.Appname == "" || status.Entrypoint == "" || status.Nodename == "" { - return types.ErrBadWorkloadStatus + return types.ErrInvaildWorkloadStatus } data, err := json.Marshal(status) @@ -228,7 +228,7 @@ func (r *Rediaron) bindWorkloadsAdditions(ctx context.Context, workloads []*type for index, workload := range workloads { if _, ok := nodes[workload.Nodename]; !ok { - return nil, types.ErrBadMeta + return nil, types.ErrInvaildWorkloadMeta } workloads[index].Engine = nodes[workload.Nodename].Engine if _, ok := statusKeys[workload.ID]; !ok { diff --git a/strategy/average.go b/strategy/average.go index 664e7f499..188e4071d 100644 --- a/strategy/average.go +++ b/strategy/average.go @@ -20,16 +20,16 @@ func AveragePlan(ctx context.Context, infos []Info, need, total, limit int) (map limit = scheduleInfosLength } if scheduleInfosLength < limit { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("node len %d < limit, cannot alloc an average node plan", scheduleInfosLength)) } sort.Slice(infos, func(i, j int) bool { return infos[i].Capacity > infos[j].Capacity }) p := sort.Search(scheduleInfosLength, func(i int) bool { return infos[i].Capacity < need }) if p == 0 { - return nil, types.NewDetailedErr(types.ErrInsufficientCap, "insufficient nodes, at least 1 needed") + return nil, types.NewDetailedErr(types.ErrInsufficientCapacity, "insufficient nodes, at least 1 needed") } if p < limit { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, fmt.Sprintf("not enough nodes with capacity of %d, require %d nodes", need, limit)) + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("not enough nodes with capacity of %d, require %d nodes", need, limit)) } deployMap := map[string]int{} for _, strategyInfo := range infos[:limit] { diff --git a/strategy/communism.go b/strategy/communism.go index 6a79c5d40..2ada886ac 100644 --- a/strategy/communism.go +++ b/strategy/communism.go @@ -7,7 +7,7 @@ import ( "github.com/projecteru2/core/types" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) type infoHeap struct { @@ -60,7 +60,7 @@ func newInfoHeap(infos []Info, limit int) heap.Interface { // 部署完 N 个后全局尽可能平均 func CommunismPlan(ctx context.Context, infos []Info, need, total, limit int) (map[string]int, error) { if total < need { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("need: %d, available: %d", need, total)) } @@ -69,7 +69,7 @@ func CommunismPlan(ctx context.Context, infos []Info, need, total, limit int) (m heap.Init(iHeap) for { if iHeap.Len() == 0 { - return nil, errors.Wrapf(types.ErrInsufficientRes, "reached nodelimit, a node can host at most %d instances", limit) + return nil, errors.Wrapf(types.ErrInsufficientResource, "reached nodelimit, a node can host at most %d instances", limit) } info := heap.Pop(iHeap).(Info) deploy[info.Nodename]++ diff --git a/strategy/fill.go b/strategy/fill.go index b7b2a33d5..b25262213 100644 --- a/strategy/fill.go +++ b/strategy/fill.go @@ -21,7 +21,7 @@ func FillPlan(ctx context.Context, infos []Info, need, _, limit int) (_ map[stri limit = scheduleInfosLength } if scheduleInfosLength < limit { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("node len %d cannot alloc a fill node plan", scheduleInfosLength)) } sort.Slice(infos, func(i, j int) bool { @@ -44,6 +44,6 @@ func FillPlan(ctx context.Context, infos []Info, need, _, limit int) (_ map[stri } } } - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("not enough nodes that can fill up to %d instances, require %d nodes", need, limit)) } diff --git a/strategy/fill_test.go b/strategy/fill_test.go index 1c180aca5..91c4ce763 100644 --- a/strategy/fill_test.go +++ b/strategy/fill_test.go @@ -40,7 +40,7 @@ func TestFillPlan(t *testing.T) { n = 15 nodes = deployedNodes() _, err = FillPlan(context.TODO(), nodes, n, 0, 0) - assert.True(t, errors.Is(err, types.ErrInsufficientRes)) + assert.True(t, errors.Is(err, types.ErrInsufficientResource)) // 全局补充不能 n = 1 diff --git a/strategy/global.go b/strategy/global.go index 4f8eba9cd..4d530056e 100644 --- a/strategy/global.go +++ b/strategy/global.go @@ -44,7 +44,7 @@ func (r *infoHeapForGlobalStrategy) Pop() interface{} { // 尽量使得资源消耗平均 func GlobalPlan(ctx context.Context, infos []Info, need, total, _ int) (map[string]int, error) { if total < need { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("need: %d, available: %d", need, total)) } strategyInfos := make([]Info, len(infos)) @@ -61,7 +61,7 @@ func GlobalPlan(ctx context.Context, infos []Info, need, total, _ int) (map[stri for i := 0; i < need; i++ { if infoHeap.Len() == 0 { - return nil, types.NewDetailedErr(types.ErrInsufficientRes, + return nil, types.NewDetailedErr(types.ErrInsufficientResource, fmt.Sprintf("need: %d, available: %d", need, i)) } infoWithMinUsage := heap.Pop(infoHeap).(Info) diff --git a/strategy/global_test.go b/strategy/global_test.go index 0f08f2e12..c7379a030 100644 --- a/strategy/global_test.go +++ b/strategy/global_test.go @@ -78,7 +78,7 @@ func TestGlobalPlan1(t *testing.T) { } arg = []Info{n1, n2, n3} r, err = GlobalPlan(context.TODO(), arg, 100, 6, 0) - assert.ErrorIs(t, err, types.ErrInsufficientRes) + assert.ErrorIs(t, err, types.ErrInsufficientResource) // fake total n1 = Info{ @@ -101,7 +101,7 @@ func TestGlobalPlan1(t *testing.T) { } arg = []Info{n1, n2, n3} r, err = GlobalPlan(context.TODO(), arg, 10, 100, 0) - assert.ErrorIs(t, err, types.ErrInsufficientRes) + assert.ErrorIs(t, err, types.ErrInsufficientResource) // small rate n1 = Info{ diff --git a/strategy/strategy.go b/strategy/strategy.go index 6ccd68f14..74544e50f 100644 --- a/strategy/strategy.go +++ b/strategy/strategy.go @@ -34,10 +34,10 @@ type strategyFunc = func(_ context.Context, _ []Info, need, total, limit int) (m func Deploy(ctx context.Context, strategy string, count, nodesLimit int, strategyInfos []Info, total int) (map[string]int, error) { deployMethod, ok := Plans[strategy] if !ok { - return nil, types.ErrBadDeployStrategy + return nil, types.ErrInvaildDeployStrategy } if count <= 0 { - return nil, types.ErrBadCount + return nil, types.ErrInvaildCount } log.Debugf(ctx, "[strategy.Deploy] infos %+v, need %d, total %d, limit %d", strategyInfos, count, total, nodesLimit) diff --git a/types/errors.go b/types/errors.go index 20b7c03cd..87147dae1 100644 --- a/types/errors.go +++ b/types/errors.go @@ -1,148 +1,118 @@ package types import ( - "fmt" - - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) -// errors var ( - ErrInsufficientCPU = errors.New("cannot alloc a plan, not enough cpu") - ErrInsufficientMEM = errors.New("cannot alloc a plan, not enough memory") - ErrInsufficientStorage = errors.New("cannot alloc a plan, not enough storage") - ErrInsufficientVolume = errors.New("cannot alloc a plan, not enough volume") - ErrInsufficientCap = errors.New("cannot alloc a each node plan, not enough capacity") - ErrInsufficientRes = errors.New("not enough resource") - ErrInvalidRes = errors.New("invalid resource") - ErrInsufficientNodes = errors.New("not enough nodes") - ErrAlreadyFilled = errors.New("Cannot alloc a fill node plan, each node has enough workloads") - - ErrZeroNodes = errors.New("no nodes provide to choose some") - - ErrNodeFormat = errors.New("bad endpoint name") - ErrNodeExist = errors.New("node already exists") - ErrNodeNotEmpty = errors.New("node not empty, still has workloads associated") - ErrNodeStatusTTL = errors.New("TTL for node status should be > 0") - - ErrKeyIsDir = errors.New("key is a directory") - ErrKeyIsNotDir = errors.New("key is not a directory") - ErrKeyIsEmpty = errors.New("key is empty") - - ErrBadWorkloadID = errors.New("workload ID must be length of 64") - ErrBadDeployStrategy = errors.New("deploy method not support yet") - ErrBadIPAddress = errors.New("bad IP address") - ErrBadSCMType = errors.New("unknown SCM type") - ErrBadMemory = errors.New("bad `Memory` value") - ErrBadCPU = errors.New("bad `CPU` value") - ErrBadStorage = errors.New("bad `Storage` value") - ErrBadVolume = errors.New("bad `Volume` value") - ErrBadCount = errors.New("bad `Count` value") - - ErrBadWorkloadStatus = errors.New("status has no appname / entrypoint/ nodename") + // - ErrPodHasNodes = errors.New("pod has nodes") - ErrPodNoNodes = errors.New("pod has no nodes") - ErrPodNotFound = errors.New("pod not found") + // Scheduler + ErrInsufficientCapacity = errors.New("cannot alloc a plan, not enough nodes capacity") + ErrInsufficientResource = errors.New("cannot alloc a plan, not enough resource") + ErrAlreadyFilled = errors.New("cannot alloc a fill node plan, each node has enough workloads") + ErrInvaildDeployStrategy = errors.New("deploy method not support yet") - ErrCannotGetEngine = errors.New("cannot get engine") - ErrNilEngine = errors.New("engine is nil") - - ErrBadMeta = errors.New("bad meta") - ErrInvaildPassword = errors.New("invaild password") - ErrInvaildUsername = errors.New("invaild username") - ErrNotFitLabels = errors.New("not fit labels") - - ErrBadRefs = errors.New("invalid image refs") - ErrNoImage = errors.New("no image") - ErrNoImageUser = errors.New("no image user") - ErrNoBuildPod = errors.New("No build pod set in config") - ErrNoBuildsInSpec = errors.New("No builds in spec") - ErrNoBuildSpec = errors.New("No build spec") - ErrNoEntryInSpec = errors.New("No entry in spec") - ErrNoDeployOpts = errors.New("No deploy options") - ErrNoWorkloadIDs = errors.New("No workload ids given") - ErrRunAndWaitCountOneWithStdin = errors.New("Count must be 1 if OpenStdin is true") - ErrUnknownControlType = errors.New("Unknown control type") - ErrUnknownBuildType = errors.New("Unknown build type") - ErrNoRemoteDigest = errors.New("got no digest") - - ErrNoETCD = errors.New("ETCD must be set") - ErrKeyNotExists = errors.New("Key not exists") - ErrKeyExists = errors.New("Key exists") - ErrNoOps = errors.New("No txn ops") - ErrTxnConditionFailed = errors.New("ETCD Txn condition failed") + // Node + ErrInvaildNodeEndpoint = errors.New("invaild node endpoint") + ErrNodeNotEmpty = errors.New("node not empty, still has workloads associated") + ErrNodeNotExists = errors.New("node not exists") + ErrInvaildNodeStatusTTL = errors.New("invaild TTL for node status, should be > 0") - ErrNotSupport = errors.New("Not Support") - ErrSCMNotSet = errors.New("SCM not set") + // Lock + ErrLockKeyInvaild = errors.New("lock key is invaild") + ErrLockSessionDone = errors.New("lock session done") - ErrInvalidBind = errors.New("invalid bind value") - ErrIgnoreWorkload = errors.New("ignore this workload") + // Client + ErrInvaildEruIPAddress = errors.New("invalid eru address") - ErrInvalidGitURL = errors.New("invalid git url format") - ErrInvalidWorkloadName = errors.New("invalid workload name") + // SCM + ErrInvaildSCMType = errors.New("SCM type not support yet") + // General + ErrInvaildIPAddress = errors.New("invalid IP address") + ErrICMPLost = errors.New("icmp packets lost") + ErrAllConnectionsFailed = errors.New("all connections failed") + ErrUnexpectedRedirect = errors.New("unexpected redirect") + + // Engine + ErrInvaildMemory = errors.New("invaild `Memory` value setting") + ErrNilEngine = errors.New("engine is nil") + ErrInvaildRefs = errors.New("invalid image refs") + ErrNoImage = errors.New("no image") + ErrNoImageUser = errors.New("no image user") + ErrInvaildRemoteDigest = errors.New("got invaild digest") + ErrNotSupportEndpoint = errors.New("not Support endpoint") ErrEngineNotImplemented = errors.New("not implemented") + ErrInvalidEngineArgs = errors.New("invalid engine args") + + // Workload + ErrInvaildWorkloadStatus = errors.New("status has no appname / entrypoint / nodename") + ErrInvaildWorkloadMeta = errors.New("invaild workload meta") + ErrInvaildWorkloadOps = errors.New("invaild workload ops") + ErrInvalidWorkloadName = errors.New("invalid workload name") + ErrWorkloadIgnored = errors.New("ignore this workload") + ErrWorkloadNotExists = errors.New("workload not exists") + + // Pod + ErrPodHasNodes = errors.New("pod has nodes") + ErrPodNoNodes = errors.New("pod has no nodes") + ErrPodNotFound = errors.New("pod not found") - ErrNodeNotExists = errors.New("node not exists") - ErrWorkloadNotExists = errors.New("workload not exists") - ErrEntityNotExists = errors.New("entity not exists") + // GRPC + ErrInvaildGRPCRequestMeta = errors.New("invaild grpc request meta") + ErrInvaildGRPCPassword = errors.New("invaild grpc password") + ErrInvaildGRPCUsername = errors.New("invaild grpc username") + + // Opts Validation + ErrNoBuildPod = errors.New("no build pod set in config") + ErrNoBuildsInSpec = errors.New("no builds in spec") + ErrNoBuildSpec = errors.New("no build spec") + ErrNoEntryInSpec = errors.New("no entry in spec") + ErrNoDeployOpts = errors.New("no deploy options") + ErrNoWorkloadIDs = errors.New("no workload ids given") + ErrNoSCMSetting = errors.New("SCM not set") + ErrRunAndWaitCountOneWithStdin = errors.New("count must be 1 if OpenStdin is true") + ErrInvaildControlType = errors.New("unknown control type") + ErrInvaildBuildType = errors.New("unknown build type") + ErrInvalidGitURL = errors.New("invalid git url format") + ErrInvalidVolumeBind = errors.New("invalid volume bind value") + ErrEmptyNodeName = errors.New("node name is empty") + ErrEmptyAppName = errors.New("app name is empty") + ErrEmptyPodName = errors.New("pod name is empty") + ErrEmptyImage = errors.New("image is empty") + ErrEmptyCount = errors.New("count is 0") + ErrEmptyWorkloadID = errors.New("workload id is empty") + ErrNegativeCPU = errors.New("cpu is negative") + ErrNegativeShare = errors.New("share is negative") + ErrNegativeMemory = errors.New("memory is negative") + ErrNegativeNUMAMemory = errors.New("numa memory is negative") + ErrNegativeStorage = errors.New("storage is negative") + ErrNegativeVolumeSize = errors.New("volume size is negative") + ErrEmptyEntrypointName = errors.New("entrypoint name is empty") + ErrUnderlineInEntrypointName = errors.New("entrypoint name has '_' character") + + // Store + ErrKeyNotExists = errors.New("key not exists") + ErrKeyExists = errors.New("key exists") + ErrNoOps = errors.New("no txn ops") + ErrTxnConditionFailed = errors.New("ETCD Txn condition failed") + ErrInvaildCount = errors.New("bad `Count` value, entity count invaild") // store key-value count not same - ErrUnregisteredWALEventType = errors.New("unregistered WAL event type") - ErrBadWALEvent = errors.New("bad WAL event type") - ErrInvalidWALBucket = errors.New("invalid WAL bucket") - ErrInvalidType = errors.New("invalid type") - ErrLockSessionDone = errors.New("lock session done") + // WAL + ErrInvaildWALEventType = errors.New("invaild WAL event type") + ErrInvaildWALEvent = errors.New("invaild WAL event type") + ErrInvalidWALBucket = errors.New("invalid WAL bucket") + ErrInvalidWALDataType = errors.New("invalid WAL data type") + // Create ErrRollbackMapIsNotEmpty = errors.New("rollback map is not empty") + ErrGetMostIdleNodeFailed = errors.New("get most idle node failed") + // Selfmon ErrMessageChanClosed = errors.New("message chan closed") - ErrEmptyNodeName = errors.New("node name is empty") - ErrEmptyAppName = errors.New("app name is empty") - ErrEmptyPodName = errors.New("pod name is empty") - ErrEmptyNodeEndpoint = errors.New("node endpoint is empty") - ErrEmptyImage = errors.New("image is empty") - ErrEmptyCount = errors.New("count is 0") - ErrEmptyWorkloadID = errors.New("workload id is empty") - ErrNegativeCPU = errors.New("cpu is negative") - ErrNegativeShare = errors.New("share is negative") - ErrNegativeMemory = errors.New("memory is negative") - ErrNegativeNUMAMemory = errors.New("numa memory is negative") - ErrNegativeStorage = errors.New("storage is negative") - ErrNegativeVolumeSize = errors.New("volume size is negative") - - ErrEmptyEntrypointName = errors.New("entrypoint name is empty") - ErrUnderlineInEntrypointName = errors.New("entrypoint name has '_' character") - + // file ErrNoFilesToSend = errors.New("no files to send") ErrNoFilesToCopy = errors.New("no files to copy") - - ErrInvalidEngineArgs = errors.New("invalid engine args") - ErrGetMostIdleNodeFailed = errors.New("get most idle node failed") - - ErrICMPLost = errors.New("icmp packets lost") - ErrAllConnectionsFailed = errors.New("all connections failed") - - ErrUnexpectedRedirect = errors.New("unexpected redirect") ) - -type detailedErr struct { - err error - details interface{} -} - -// Error . -func (d detailedErr) Error() string { - return fmt.Sprintf("%s: %+v", d.err, d.details) -} - -// Unwrap . -func (d detailedErr) Unwrap() error { - return d.err -} - -// NewDetailedErr returns an error with details -func NewDetailedErr(err error, details interface{}) error { - return detailedErr{err: err, details: details} -} diff --git a/types/errors_test.go b/types/errors_test.go index 86115106f..3c823e17c 100644 --- a/types/errors_test.go +++ b/types/errors_test.go @@ -17,5 +17,5 @@ func TestDetailedErr(t *testing.T) { assert.True(t, errors.Is(dt, err)) assert.True(t, strings.Contains(dt.Error(), detail)) - assert.True(t, errors.Is(NewDetailedErr(ErrBadCount, detail), ErrBadCount)) + assert.True(t, errors.Is(NewDetailedErr(ErrInvaildCount, detail), ErrInvaildCount)) } diff --git a/types/options.go b/types/options.go index 0169074cf..c06d22640 100644 --- a/types/options.go +++ b/types/options.go @@ -202,7 +202,7 @@ func (o *AddNodeOptions) Validate() error { return ErrEmptyPodName } if o.Endpoint == "" { - return ErrEmptyNodeEndpoint + return ErrInvaildNodeEndpoint } return nil } diff --git a/types/options_test.go b/types/options_test.go index c76cf5301..ec25c520b 100644 --- a/types/options_test.go +++ b/types/options_test.go @@ -132,7 +132,7 @@ func TestValidatingAddNodeOptions(t *testing.T) { assert.Equal(ErrEmptyPodName, o.Validate()) o.Podname = "podname" - assert.Equal(ErrEmptyNodeEndpoint, o.Validate()) + assert.Equal(ErrInvaildNodeEndpoint, o.Validate()) o.Endpoint = "tcp://endpoint:2376" assert.NoError(o.Validate()) diff --git a/types/workload.go b/types/workload.go index 2aefe561e..018efec4d 100644 --- a/types/workload.go +++ b/types/workload.go @@ -7,7 +7,7 @@ import ( "github.com/projecteru2/core/engine" enginetypes "github.com/projecteru2/core/engine/types" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // StatusMeta indicate contaienr runtime diff --git a/utils/service.go b/utils/service.go index b23d7e05a..949b28bd4 100644 --- a/utils/service.go +++ b/utils/service.go @@ -5,7 +5,7 @@ import ( "net" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" ) // GetOutboundAddress finds out self-service address diff --git a/wal/hydro.go b/wal/hydro.go index 913ca3de5..96d281001 100644 --- a/wal/hydro.go +++ b/wal/hydro.go @@ -81,7 +81,7 @@ func (h *Hydro) Recover(ctx context.Context) { func (h *Hydro) Log(eventyp string, item interface{}) (Commit, error) { handler, ok := h.getEventHandler(eventyp) if !ok { - return nil, coretypes.NewDetailedErr(coretypes.ErrUnregisteredWALEventType, eventyp) + return nil, coretypes.NewDetailedErr(coretypes.ErrInvaildWALEventType, eventyp) } bs, err := handler.Encode(item) // TODO 2 times encode is necessary? @@ -96,7 +96,7 @@ func (h *Hydro) Log(eventyp string, item interface{}) (Commit, error) { event := NewHydroEvent(id, eventyp, bs) if bs, err = event.Encode(); err != nil { - return nil, coretypes.ErrBadWALEvent + return nil, coretypes.ErrInvaildWALEvent } if err = h.store.Put(event.Key(), bs); err != nil { diff --git a/wal/kv/mocked.go b/wal/kv/mocked.go index 52185d498..2a038349c 100644 --- a/wal/kv/mocked.go +++ b/wal/kv/mocked.go @@ -6,8 +6,8 @@ import ( "sync" "time" + "github.com/cockroachdb/errors" "github.com/cornelk/hashmap" - "github.com/pkg/errors" ) // MockedKV .