From 6c107e778a64bebd3e177aed68a3932f50ff3630 Mon Sep 17 00:00:00 2001 From: eamon Date: Fri, 5 Jun 2020 12:21:52 +0800 Subject: [PATCH] update file location --- README.md | 8 ++++---- .../{06_circuit_breaker => 01_circuit_breaker}/README.md | 0 .../breaker/breaker.go | 0 .../breaker/breaker_test.go | 0 .../breaker_options.go | 0 .../circuit_breaker_adv.go | 0 .../circuit_breaker_test.go | 0 .../circuit_counter.go | 0 .../circuit_func_closure_basic.go | 0 .../gobreaker/README.md | 0 .../gobreaker/gobreaker.go | 0 .../gobreaker/gobreaker_example_test.go | 0 .../gobreaker/gobreaker_test.go | 0 .../{07_rate_limiting => 02_rate_limiting}/README.md | 0 .../rate_limiting.go | 0 .../rate_limiting_test.go | 0 resiliency/{14_deadline => 03_deadline}/deadline.go | 0 resiliency/{14_deadline => 03_deadline}/deadline_test.go | 0 resiliency/{15_retrier => 04_retrier}/backoffs.go | 0 resiliency/{15_retrier => 04_retrier}/backoffs_test.go | 0 resiliency/{15_retrier => 04_retrier}/classifier.go | 0 resiliency/{15_retrier => 04_retrier}/classifier_test.go | 0 resiliency/{15_retrier => 04_retrier}/retrier.go | 0 resiliency/{15_retrier => 04_retrier}/retrier_test.go | 0 24 files changed, 4 insertions(+), 4 deletions(-) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/README.md (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/breaker/breaker.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/breaker/breaker_test.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/breaker_options.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/circuit_breaker_adv.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/circuit_breaker_test.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/circuit_counter.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/circuit_func_closure_basic.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/gobreaker/README.md (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/gobreaker/gobreaker.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/gobreaker/gobreaker_example_test.go (100%) rename resiliency/{06_circuit_breaker => 01_circuit_breaker}/gobreaker/gobreaker_test.go (100%) rename resiliency/{07_rate_limiting => 02_rate_limiting}/README.md (100%) rename resiliency/{07_rate_limiting => 02_rate_limiting}/rate_limiting.go (100%) rename resiliency/{07_rate_limiting => 02_rate_limiting}/rate_limiting_test.go (100%) rename resiliency/{14_deadline => 03_deadline}/deadline.go (100%) rename resiliency/{14_deadline => 03_deadline}/deadline_test.go (100%) rename resiliency/{15_retrier => 04_retrier}/backoffs.go (100%) rename resiliency/{15_retrier => 04_retrier}/backoffs_test.go (100%) rename resiliency/{15_retrier => 04_retrier}/classifier.go (100%) rename resiliency/{15_retrier => 04_retrier}/classifier_test.go (100%) rename resiliency/{15_retrier => 04_retrier}/retrier.go (100%) rename resiliency/{15_retrier => 04_retrier}/retrier_test.go (100%) 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