支持缓存+队列,支持驱动:redis、memory

This commit is contained in:
linwenxiang committed 2020-08-10 20:57:17 +08:00
1 parent bdde879238
commit 2b794c03cc
8 files changed
+200 -155

No files matched your search

+4 -2
View File
@@ -2,6 +2,8 @@ package cache
import (
"time"
"github.com/matchstalk/utils/cache"
)
type Adapter interface {
@@ -12,9 +14,9 @@ type Adapter interface {
HashGet(hk, key string) (string, error)
HashDel(hk, key string) error
Increase(key string) error
Decrease(key string) error
Expire(key string, dur time.Duration) error
SetQueue(name string, message Message) error
GetQueue(name string, f func(message Message) error)
cache.AdapterQueue
}
type Message interface {