Skip to content
Snippets Groups Projects
Commit 7f25aee6 authored by Anton Sattarov's avatar Anton Sattarov
Browse files

Обновлены внешние зависимости проекта perxis-go

parent 606406be
No related branches found
No related tags found
No related merge requests found
......@@ -4,61 +4,58 @@ go 1.21
require (
github.com/antonmedv/expr v1.9.0
github.com/avast/retry-go v3.0.0+incompatible
github.com/go-kit/kit v0.12.0
github.com/golang/protobuf v1.5.2
github.com/avast/retry-go/v4 v4.5.0
github.com/go-kit/kit v0.13.0
github.com/golang/protobuf v1.5.3
github.com/gosimple/slug v1.13.1
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/json-iterator/go v1.1.12
github.com/mitchellh/mapstructure v1.4.2
github.com/nats-io/nats.go v1.23.0
github.com/mitchellh/mapstructure v1.5.0
github.com/nats-io/nats.go v1.31.0
github.com/pkg/errors v0.9.1
github.com/rs/xid v1.4.0
github.com/stretchr/testify v1.8.2
go.mongodb.org/mongo-driver v1.11.4
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
go.uber.org/zap v1.19.1
golang.org/x/crypto v0.8.0
golang.org/x/net v0.9.0
golang.org/x/oauth2 v0.4.0
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
github.com/rs/xid v1.5.0
github.com/stretchr/testify v1.8.4
go.mongodb.org/mongo-driver v1.12.1
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/trace v1.19.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.14.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.13.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1
)
require (
cloud.google.com/go/compute v1.15.1 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gosimple/unidecode v1.0.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
)
This diff is collapsed.
......@@ -5,7 +5,7 @@ import (
"time"
"git.perx.ru/perxis/perxis-go/pkg/service"
lru "github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru/v2"
"go.uber.org/zap"
)
......@@ -15,7 +15,7 @@ const (
)
type Cache struct {
cache *lru.Cache
cache *lru.Cache[interface{}, interface{}]
ttl time.Duration
logger *zap.Logger
}
......@@ -32,7 +32,7 @@ func NewCache(size int, ttl time.Duration, opts ...interface{}) *Cache {
if ttl == 0 {
ttl = defaultTTL
}
c, err := lru.New(size)
c, err := lru.New[interface{}, interface{}](size)
if err != nil {
panic(err)
}
......@@ -65,7 +65,7 @@ func (c *Cache) Get(key interface{}) (value interface{}, err error) {
if ok {
v := val.(*item)
if v.expiredAt.Before(time.Now()) {
c.Remove(key)
_ = c.Remove(key)
c.logger.Debug("Expired", zap.String("key", fmt.Sprintf("%v", key)), zap.String("ptr", fmt.Sprintf("%p", v.value)))
return nil, service.ErrNotFound
}
......
......@@ -6,7 +6,7 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/auth"
"git.perx.ru/perxis/perxis-go/pkg/extension"
"github.com/avast/retry-go"
retry "github.com/avast/retry-go/v4"
"go.uber.org/zap"
"google.golang.org/grpc"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment