mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-05 07:57:00 +08:00
feat: implement websocket and UI
This commit is contained in:
4
util.go
4
util.go
@@ -19,6 +19,10 @@ func (b *Broker) NotifyHandler() func(context.Context, Result) error {
|
||||
return b.opts.notifyResponse
|
||||
}
|
||||
|
||||
func (b *Broker) SetNotifyHandler(callback Callback) {
|
||||
b.opts.notifyResponse = callback
|
||||
}
|
||||
|
||||
func (b *Broker) HandleCallback(ctx context.Context, msg *codec.Message) {
|
||||
if b.opts.callback != nil {
|
||||
var result Result
|
||||
|
Reference in New Issue
Block a user