mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-27 10:36:00 +08:00
增加集群部署支持,修复定时任务分组添加后选项不显示
This commit is contained in:
16
server/internal/library/hgrds/pubsub/publish.go
Normal file
16
server/internal/library/hgrds/pubsub/publish.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Package pubsub
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package pubsub
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// Publish 推送消息
|
||||
func Publish(ctx context.Context, channel string, message interface{}) (int64, error) {
|
||||
return g.Redis().Publish(ctx, channel, message)
|
||||
}
|
||||
Reference in New Issue
Block a user