Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJECT = ratelimit
REGISTRY ?= envoyproxy
IMAGE := $(REGISTRY)/$(PROJECT)
INTEGRATION_IMAGE := $(REGISTRY)/$(PROJECT)_integration
MODULE = github.com/envoyproxy/ratelimit
MODULE = github.com/goatapp/ratelimit
GIT_REF = $(shell git describe --tags --exact-match 2>/dev/null || git rev-parse --short=8 --verify HEAD)
VERSION ?= $(GIT_REF)
SHELL := /bin/bash
Expand Down
2 changes: 1 addition & 1 deletion examples/xds-sotw-config-server/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/envoyproxy/go-control-plane/pkg/server/v3"
"github.com/envoyproxy/go-control-plane/pkg/test/v3"

example "github.com/envoyproxy/ratelimit/examples/xds-sotw-config-server"
example "github.com/goatapp/ratelimit/examples/xds-sotw-config-server"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/envoyproxy/ratelimit
module github.com/goatapp/ratelimit

go 1.21.5

Expand Down
2 changes: 1 addition & 1 deletion src/client_cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"

"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/utils"

"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"

Expand Down
2 changes: 1 addition & 1 deletion src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
"golang.org/x/net/context"

"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/stats"
)

// Errors that may be raised during config parsing.
Expand Down
2 changes: 1 addition & 1 deletion src/config/config_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"golang.org/x/net/context"
"gopkg.in/yaml.v2"

"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/stats"
)

type yamlReplaces struct {
Expand Down
6 changes: 3 additions & 3 deletions src/config_check_cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"os"
"path/filepath"

"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/stats"

gostats "github.com/lyft/gostats"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/config"
)

func loadConfigs(allConfigs []config.RateLimitConfigToLoad, mergeDomainConfigs bool) {
Expand Down
8 changes: 4 additions & 4 deletions src/limiter/base_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
logger "github.com/sirupsen/logrus"

"github.com/envoyproxy/ratelimit/src/assert"
"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/assert"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/utils"
)

type BaseRateLimiter struct {
Expand Down
2 changes: 1 addition & 1 deletion src/limiter/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
"golang.org/x/net/context"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/config"
)

// Interface for interacting with a cache backend for rate limiting.
Expand Down
4 changes: 2 additions & 2 deletions src/limiter/cache_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
pb_struct "github.com/envoyproxy/go-control-plane/envoy/extensions/common/ratelimit/v3"
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/utils"
)

type CacheKeyGenerator struct {
Expand Down
12 changes: 6 additions & 6 deletions src/memcached/cache_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/stats"

"github.com/coocood/freecache"
gostats "github.com/lyft/gostats"
Expand All @@ -37,11 +37,11 @@ import (

pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/srv"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/srv"
"github.com/goatapp/ratelimit/src/utils"
)

var tracer = otel.Tracer("memcached.cacheImpl")
Expand Down
2 changes: 1 addition & 1 deletion src/memcached/cache_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/golang/mock/gomock"

mock_srv "github.com/envoyproxy/ratelimit/test/mocks/srv"
mock_srv "github.com/goatapp/ratelimit/test/mocks/srv"
)

func TestRefreshServersSetsServersOnEmptyServerList(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions src/provider/file_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
gostats "github.com/lyft/gostats"
logger "github.com/sirupsen/logrus"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/stats"
)

type FileProvider struct {
Expand Down
2 changes: 1 addition & 1 deletion src/provider/provider.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package provider

import (
"github.com/envoyproxy/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/config"
)

// RateLimitConfigProvider is the interface for configurations providers.
Expand Down
6 changes: 3 additions & 3 deletions src/provider/xds_grpc_sotw_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/structpb"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/stats"

"github.com/envoyproxy/go-control-plane/pkg/client/sotw/v3"
rls_conf_v3 "github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3"
Expand Down
10 changes: 5 additions & 5 deletions src/redis/cache_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

"github.com/coocood/freecache"

"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/server"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/server"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/utils"
)

func NewRateLimiterCacheImplFromSettings(ctx context.Context, s settings.Settings, localCache *freecache.Cache, srv server.Server,
Expand Down
4 changes: 2 additions & 2 deletions src/redis/driver_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/mediocregopher/radix/v4/trace"
logger "github.com/sirupsen/logrus"

"github.com/envoyproxy/ratelimit/src/server"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/server"
"github.com/goatapp/ratelimit/src/utils"
)

type commonClient interface {
Expand Down
8 changes: 4 additions & 4 deletions src/redis/fixed_cache_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/stats"

"github.com/coocood/freecache"
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
"github.com/mediocregopher/radix/v4"
logger "github.com/sirupsen/logrus"
"golang.org/x/net/context"

"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/utils"
)

var script = `local expires_at = tonumber(redis.call("get", ARGV[2]))
Expand Down
2 changes: 1 addition & 1 deletion src/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"

"github.com/envoyproxy/ratelimit/src/provider"
"github.com/goatapp/ratelimit/src/provider"

stats "github.com/lyft/gostats"
"google.golang.org/grpc"
Expand Down
8 changes: 4 additions & 4 deletions src/server/server_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"google.golang.org/grpc/keepalive"
"google.golang.org/protobuf/encoding/protojson"

"github.com/envoyproxy/ratelimit/src/provider"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/provider"
"github.com/goatapp/ratelimit/src/stats"

"github.com/coocood/freecache"
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
Expand All @@ -33,8 +33,8 @@ import (
"google.golang.org/grpc/health"
healthpb "google.golang.org/grpc/health/grpc_health_v1"

"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/settings"

"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"go.opentelemetry.io/otel"
Expand Down
18 changes: 9 additions & 9 deletions src/service/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"

"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/stats"

"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/utils"

core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
logger "github.com/sirupsen/logrus"
"golang.org/x/net/context"

"github.com/envoyproxy/ratelimit/src/assert"
"github.com/envoyproxy/ratelimit/src/config"
"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/provider"
"github.com/envoyproxy/ratelimit/src/redis"
"github.com/envoyproxy/ratelimit/src/server"
"github.com/goatapp/ratelimit/src/assert"
"github.com/goatapp/ratelimit/src/config"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/provider"
"github.com/goatapp/ratelimit/src/redis"
"github.com/goatapp/ratelimit/src/server"
)

var tracer = otel.Tracer("ratelimit")
Expand Down
4 changes: 2 additions & 2 deletions src/service_cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/envoyproxy/ratelimit/src/service_cmd/runner"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/service_cmd/runner"
"github.com/goatapp/ratelimit/src/settings"
)

func main() {
Expand Down
20 changes: 10 additions & 10 deletions src/service_cmd/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"time"

"github.com/envoyproxy/ratelimit/src/metrics"
"github.com/envoyproxy/ratelimit/src/stats"
"github.com/envoyproxy/ratelimit/src/trace"
"github.com/goatapp/ratelimit/src/metrics"
"github.com/goatapp/ratelimit/src/stats"
"github.com/goatapp/ratelimit/src/trace"

gostats "github.com/lyft/gostats"

Expand All @@ -21,13 +21,13 @@ import (

logger "github.com/sirupsen/logrus"

"github.com/envoyproxy/ratelimit/src/limiter"
"github.com/envoyproxy/ratelimit/src/memcached"
"github.com/envoyproxy/ratelimit/src/redis"
"github.com/envoyproxy/ratelimit/src/server"
ratelimit "github.com/envoyproxy/ratelimit/src/service"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/limiter"
"github.com/goatapp/ratelimit/src/memcached"
"github.com/goatapp/ratelimit/src/redis"
"github.com/goatapp/ratelimit/src/server"
ratelimit "github.com/goatapp/ratelimit/src/service"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/utils"
)

type Runner struct {
Expand Down
2 changes: 1 addition & 1 deletion src/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/kelseyhightower/envconfig"
"google.golang.org/grpc"

"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/utils"
)

type Settings struct {
Expand Down
4 changes: 2 additions & 2 deletions src/stats/manager_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
gostats "github.com/lyft/gostats"
logger "github.com/sirupsen/logrus"

"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/utils"
)

func NewStatManager(store gostats.Store, settings settings.Settings) *ManagerImpl {
Expand Down
6 changes: 3 additions & 3 deletions test/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (
"os"
"testing"

"github.com/envoyproxy/ratelimit/test/common"
"github.com/goatapp/ratelimit/test/common"

pb_struct "github.com/envoyproxy/go-control-plane/envoy/extensions/common/ratelimit/v3"
pb "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3"
pb_type "github.com/envoyproxy/go-control-plane/envoy/type/v3"
stats "github.com/lyft/gostats"
"github.com/stretchr/testify/assert"

"github.com/envoyproxy/ratelimit/src/config"
mockstats "github.com/envoyproxy/ratelimit/test/mocks/stats"
"github.com/goatapp/ratelimit/src/config"
mockstats "github.com/goatapp/ratelimit/test/mocks/stats"
)

func loadFile(path string) []config.RateLimitConfigToLoad {
Expand Down
10 changes: 5 additions & 5 deletions test/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/envoyproxy/ratelimit/src/memcached"
"github.com/envoyproxy/ratelimit/src/service_cmd/runner"
"github.com/envoyproxy/ratelimit/src/settings"
"github.com/envoyproxy/ratelimit/src/utils"
"github.com/envoyproxy/ratelimit/test/common"
"github.com/goatapp/ratelimit/src/memcached"
"github.com/goatapp/ratelimit/src/service_cmd/runner"
"github.com/goatapp/ratelimit/src/settings"
"github.com/goatapp/ratelimit/src/utils"
"github.com/goatapp/ratelimit/test/common"
)

var projectDir = os.Getenv("PROJECT_DIR")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/mtls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"
"time"

"github.com/envoyproxy/ratelimit/src/utils"
"github.com/goatapp/ratelimit/src/utils"
)

func createCA() (caFileName string, ca *x509.Certificate, pk *rsa.PrivateKey, err error) {
Expand Down
Loading