chore(queue): support NSQ as backend. (#600)
This commit is contained in:
18
core/queue.go
Normal file
18
core/queue.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user