diff --git a/redis限流/target/classes/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat b/redis限流/target/classes/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat deleted file mode 100644 index 738e011..0000000 Binary files a/redis限流/target/classes/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat and /dev/null differ diff --git a/redis限流/target/classes/application.properties b/redis限流/target/classes/application.properties deleted file mode 100644 index acdf5bd..0000000 --- a/redis限流/target/classes/application.properties +++ /dev/null @@ -1,19 +0,0 @@ -spring.application.name=tlog-logback-feign-consumer -server.port=3111 -#eureka.client.service-url.defaultZone=http://127.0.0.1:1111/eureka/ - -tlog.pattern=[$currIp][$spanId][$traceId] -#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 - -http.connectTimeOutMillis=8000 -http.readTimeOutMillis=8000 - -spring.task.execution.pool.core-size=5 -spring.task.execution.pool.max-size=50 -spring.task.execution.pool.queue-capacity=200 -spring.task.execution.thread-name-prefix=woniugege- - - -spring.redis.host=192.168.56.10 -spring.redis.password=123456 -spring.redis.port=6379 diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/TLogFeignConsumerRunner.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/TLogFeignConsumerRunner.class deleted file mode 100644 index e8cec92..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/TLogFeignConsumerRunner.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimit.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimit.class deleted file mode 100644 index fffc5d9..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimit.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimitAop.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimitAop.class deleted file mode 100644 index a7ef5fc..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/aop/RedisLimitAop.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/Log4j2Rule.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/Log4j2Rule.class deleted file mode 100644 index bee301d..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/Log4j2Rule.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/RedisConfig.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/RedisConfig.class deleted file mode 100644 index 539739d..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/configuration/RedisConfig.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/controller/LimitRedisController.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/controller/LimitRedisController.class deleted file mode 100644 index 3e03560..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/controller/LimitRedisController.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/GlobalExceptionHandler.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/GlobalExceptionHandler.class deleted file mode 100644 index af98984..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/GlobalExceptionHandler.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/RedisLimitException.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/RedisLimitException.class deleted file mode 100644 index d888a1b..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/exception/RedisLimitException.class and /dev/null differ diff --git a/redis限流/target/classes/com/yomahub/tlog/example/feign/vo/ResultInfo.class b/redis限流/target/classes/com/yomahub/tlog/example/feign/vo/ResultInfo.class deleted file mode 100644 index a770600..0000000 Binary files a/redis限流/target/classes/com/yomahub/tlog/example/feign/vo/ResultInfo.class and /dev/null differ diff --git a/redis限流/target/classes/rateLimiter.lua b/redis限流/target/classes/rateLimiter.lua deleted file mode 100644 index 362e0cc..0000000 --- a/redis限流/target/classes/rateLimiter.lua +++ /dev/null @@ -1,16 +0,0 @@ ---获取KEY -local key = KEYS[1] - -local limit = tonumber(ARGV[1]) - -local curentLimit = tonumber(redis.call('get', key) or "0") - -if curentLimit + 1 > limit -then return 0 -else - -- 自增长 1 - redis.call('INCRBY', key, 1) - -- 设置过期时间 - redis.call('EXPIRE', key, ARGV[2]) - return curentLimit + 1 -end \ No newline at end of file