Skip to content

Commit

Permalink
add redis-cluster policy tips for limit-count
Browse files Browse the repository at this point in the history
  • Loading branch information
okaybase committed Aug 13, 2021
1 parent b4a18e1 commit f99d151
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/internal/core/migrate/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

type DataSet struct {
Consumers []*entity.Consumer
Counsumers []*entity.Consumer
Routes []*entity.Route
Services []*entity.Service
SSLs []*entity.SSL
Expand All @@ -37,7 +37,7 @@ type DataSet struct {

func newDataSet() *DataSet {
return &DataSet{
Consumers: make([]*entity.Consumer, 0),
Counsumers: make([]*entity.Consumer, 0),
Routes: make([]*entity.Route, 0),
Services: make([]*entity.Service, 0),
SSLs: make([]*entity.SSL, 0),
Expand All @@ -51,7 +51,7 @@ func newDataSet() *DataSet {
func (a *DataSet) rangeData(key store.HubKey, f func(int, interface{}) bool) {
switch key {
case store.HubKeyConsumer:
for i, v := range a.Consumers {
for i, v := range a.Counsumers {
if !f(i, v) {
break
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func (a *DataSet) Add(obj interface{}) error {
var err error = nil
switch obj := obj.(type) {
case *entity.Consumer:
a.Consumers = append(a.Consumers, obj)
a.Counsumers = append(a.Counsumers, obj)
case *entity.Route:
a.Routes = append(a.Routes, obj)
case *entity.Service:
Expand Down
2 changes: 1 addition & 1 deletion api/test/e2enew/migrate/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
)

type AllData struct {
Consumers []interface{}
Counsumers []interface{}
Routes []interface{}
Services []interface{}
SSLs []interface{}
Expand Down

0 comments on commit f99d151

Please sign in to comment.