Skip to content

Commit

Permalink
rename to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
klaidliadon committed Oct 29, 2024
1 parent 156f765 commit 3b75d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ type Config struct {
MaxIdle int `toml:"max_idle"` // default: 5
MaxActive int `toml:"max_active"` // default: 10

Provider Provider `toml:"provider"` // default: ""
Backend Backend `toml:"backend"` // default: ""
}

type Provider string
type Backend string

const (
ProviderMemoryStore Provider = "memory-store"
BackendMemoryStore Backend = "memory-store"
)
2 changes: 1 addition & 1 deletion httprateredis.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewCounter(cfg *Config) *redisCounter {
cfg.Port = 6379
}
// MemoryStore does not support client setname.
if cfg.Provider != ProviderMemoryStore && cfg.ClientName == "" {
if cfg.Backend != BackendMemoryStore && cfg.ClientName == "" {
cfg.ClientName = filepath.Base(os.Args[0])
}
if cfg.PrefixKey == "" {
Expand Down

0 comments on commit 3b75d1f

Please sign in to comment.