chore(queue): support NSQ as backend. (#600)

This commit is contained in:
Bo-Yi Wu
2021-07-17 20:14:19 +08:00
committed by GitHub
parent c7112a6eb3
commit 2e2dd9b8d6
18 changed files with 272 additions and 12 deletions

18
core/queue.go Normal file
View File

@@ -0,0 +1,18 @@
package core
// Queue as backend
type Queue string
var (
// LocalQueue for channel in Go
LocalQueue Queue = "local"
// NSQ a realtime distributed messaging platform
NSQ Queue = "nsq"
// NATS Connective Technology for Adaptive Edge & Distributed Systems
NATS Queue = "nats"
)
// IsLocalQueue check is Local Queue
func IsLocalQueue(q Queue) bool {
return q == LocalQueue
}