diff --git a/README.md b/README.md index 8110a26..1398ec0 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,10 @@ go test ./... ## 弹性模式 Resiliency Patterns -+ [x] [熔断模式(circuit breaker)](./resiliency/06_circuit_breaker) -+ [x] [限流模式(rate limiting)](./resiliency/07_rate_limiting) -+ [ ] [WIP][重试模式(retrier)](./resiliency/15_retrier) -+ [ ] [WIP][最后期限模式(deadline)](./resiliency/14_deadline) ++ [x] [熔断模式(circuit breaker)](./resiliency/01_circuit_breaker) ++ [x] [限流模式(rate limiting)](./resiliency/02_rate_limiting) ++ [ ] [WIP][重试模式(retrier)](./resiliency/04_retrier) ++ [ ] [WIP][最后期限模式(deadline)](./resiliency/03_deadline) ## 更多模式(同步/并发/并行) Go More Patterns(Concurrency/Parallelism/Sync) diff --git a/resiliency/06_circuit_breaker/README.md b/resiliency/01_circuit_breaker/README.md similarity index 100% rename from resiliency/06_circuit_breaker/README.md rename to resiliency/01_circuit_breaker/README.md diff --git a/resiliency/06_circuit_breaker/breaker/breaker.go b/resiliency/01_circuit_breaker/breaker/breaker.go similarity index 100% rename from resiliency/06_circuit_breaker/breaker/breaker.go rename to resiliency/01_circuit_breaker/breaker/breaker.go diff --git a/resiliency/06_circuit_breaker/breaker/breaker_test.go b/resiliency/01_circuit_breaker/breaker/breaker_test.go similarity index 100% rename from resiliency/06_circuit_breaker/breaker/breaker_test.go rename to resiliency/01_circuit_breaker/breaker/breaker_test.go diff --git a/resiliency/06_circuit_breaker/breaker_options.go b/resiliency/01_circuit_breaker/breaker_options.go similarity index 100% rename from resiliency/06_circuit_breaker/breaker_options.go rename to resiliency/01_circuit_breaker/breaker_options.go diff --git a/resiliency/06_circuit_breaker/circuit_breaker_adv.go b/resiliency/01_circuit_breaker/circuit_breaker_adv.go similarity index 100% rename from resiliency/06_circuit_breaker/circuit_breaker_adv.go rename to resiliency/01_circuit_breaker/circuit_breaker_adv.go diff --git a/resiliency/06_circuit_breaker/circuit_breaker_test.go b/resiliency/01_circuit_breaker/circuit_breaker_test.go similarity index 100% rename from resiliency/06_circuit_breaker/circuit_breaker_test.go rename to resiliency/01_circuit_breaker/circuit_breaker_test.go diff --git a/resiliency/06_circuit_breaker/circuit_counter.go b/resiliency/01_circuit_breaker/circuit_counter.go similarity index 100% rename from resiliency/06_circuit_breaker/circuit_counter.go rename to resiliency/01_circuit_breaker/circuit_counter.go diff --git a/resiliency/06_circuit_breaker/circuit_func_closure_basic.go b/resiliency/01_circuit_breaker/circuit_func_closure_basic.go similarity index 100% rename from resiliency/06_circuit_breaker/circuit_func_closure_basic.go rename to resiliency/01_circuit_breaker/circuit_func_closure_basic.go diff --git a/resiliency/06_circuit_breaker/gobreaker/README.md b/resiliency/01_circuit_breaker/gobreaker/README.md similarity index 100% rename from resiliency/06_circuit_breaker/gobreaker/README.md rename to resiliency/01_circuit_breaker/gobreaker/README.md diff --git a/resiliency/06_circuit_breaker/gobreaker/gobreaker.go b/resiliency/01_circuit_breaker/gobreaker/gobreaker.go similarity index 100% rename from resiliency/06_circuit_breaker/gobreaker/gobreaker.go rename to resiliency/01_circuit_breaker/gobreaker/gobreaker.go diff --git a/resiliency/06_circuit_breaker/gobreaker/gobreaker_example_test.go b/resiliency/01_circuit_breaker/gobreaker/gobreaker_example_test.go similarity index 100% rename from resiliency/06_circuit_breaker/gobreaker/gobreaker_example_test.go rename to resiliency/01_circuit_breaker/gobreaker/gobreaker_example_test.go diff --git a/resiliency/06_circuit_breaker/gobreaker/gobreaker_test.go b/resiliency/01_circuit_breaker/gobreaker/gobreaker_test.go similarity index 100% rename from resiliency/06_circuit_breaker/gobreaker/gobreaker_test.go rename to resiliency/01_circuit_breaker/gobreaker/gobreaker_test.go diff --git a/resiliency/07_rate_limiting/README.md b/resiliency/02_rate_limiting/README.md similarity index 100% rename from resiliency/07_rate_limiting/README.md rename to resiliency/02_rate_limiting/README.md diff --git a/resiliency/07_rate_limiting/rate_limiting.go b/resiliency/02_rate_limiting/rate_limiting.go similarity index 100% rename from resiliency/07_rate_limiting/rate_limiting.go rename to resiliency/02_rate_limiting/rate_limiting.go diff --git a/resiliency/07_rate_limiting/rate_limiting_test.go b/resiliency/02_rate_limiting/rate_limiting_test.go similarity index 100% rename from resiliency/07_rate_limiting/rate_limiting_test.go rename to resiliency/02_rate_limiting/rate_limiting_test.go diff --git a/resiliency/14_deadline/deadline.go b/resiliency/03_deadline/deadline.go similarity index 100% rename from resiliency/14_deadline/deadline.go rename to resiliency/03_deadline/deadline.go diff --git a/resiliency/14_deadline/deadline_test.go b/resiliency/03_deadline/deadline_test.go similarity index 100% rename from resiliency/14_deadline/deadline_test.go rename to resiliency/03_deadline/deadline_test.go diff --git a/resiliency/15_retrier/backoffs.go b/resiliency/04_retrier/backoffs.go similarity index 100% rename from resiliency/15_retrier/backoffs.go rename to resiliency/04_retrier/backoffs.go diff --git a/resiliency/15_retrier/backoffs_test.go b/resiliency/04_retrier/backoffs_test.go similarity index 100% rename from resiliency/15_retrier/backoffs_test.go rename to resiliency/04_retrier/backoffs_test.go diff --git a/resiliency/15_retrier/classifier.go b/resiliency/04_retrier/classifier.go similarity index 100% rename from resiliency/15_retrier/classifier.go rename to resiliency/04_retrier/classifier.go diff --git a/resiliency/15_retrier/classifier_test.go b/resiliency/04_retrier/classifier_test.go similarity index 100% rename from resiliency/15_retrier/classifier_test.go rename to resiliency/04_retrier/classifier_test.go diff --git a/resiliency/15_retrier/retrier.go b/resiliency/04_retrier/retrier.go similarity index 100% rename from resiliency/15_retrier/retrier.go rename to resiliency/04_retrier/retrier.go diff --git a/resiliency/15_retrier/retrier_test.go b/resiliency/04_retrier/retrier_test.go similarity index 100% rename from resiliency/15_retrier/retrier_test.go rename to resiliency/04_retrier/retrier_test.go