支持缓存+队列,支持驱动:redis、memory
This commit is contained in:
1 parent
bdde879238
commit
2b794c03cc
8 files changed
+200
-155
No files matched your search
Vendored
+4
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user