mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-01 06:12:10 +08:00
update: HTTP API
This commit is contained in:
@@ -3,13 +3,13 @@ package main
|
||||
import (
|
||||
"context"
|
||||
|
||||
mq2 "github.com/oarkflow/mq"
|
||||
"github.com/oarkflow/mq"
|
||||
|
||||
"github.com/oarkflow/mq/examples/tasks"
|
||||
)
|
||||
|
||||
func main() {
|
||||
b := mq2.NewBroker(mq2.WithCallback(tasks.Callback))
|
||||
b := mq.NewBroker(mq.WithCallback(tasks.Callback), mq.WithBrokerURL(":8081"))
|
||||
// b := mq.NewBroker(mq.WithCallback(tasks.Callback), mq.WithTLS(true, "./certs/server.crt", "./certs/server.key"), mq.WithCAPath("./certs/ca.cert"))
|
||||
b.NewQueue("queue1")
|
||||
b.NewQueue("queue2")
|
||||
|
Reference in New Issue
Block a user