by Robin at 20241015
This commit is contained in:
parent
efb929e7ac
commit
3f10ab9330
|
@ -79,6 +79,7 @@ func main() {
|
|||
service.DefaultTextAuditTaskResultHandler = service.NewTextAuditTaskResultHandler()
|
||||
service.DefaultVideoModerationTaskResultHandler = service.NewVideoModerationTaskResultHandler()
|
||||
service.DefaultStreamerRecommService = service.NewStreamerRecommService()
|
||||
service.DefaultNotifBcstCenter = service.NewNotifBcstCenter()
|
||||
err = service.DefaultService.Init(cfg)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("Service init fail, err: %v", err)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
package logic
|
|
@ -0,0 +1,51 @@
|
|||
package service
|
||||
|
||||
var DefaultNotifBcstCenter *NotifBcstCenter
|
||||
|
||||
// 全局广播消息中心
|
||||
type NotifBcstCenter struct{}
|
||||
|
||||
func NewNotifBcstCenter() *NotifBcstCenter {
|
||||
return new(NotifBcstCenter)
|
||||
}
|
||||
|
||||
// 获取主播全局广播消息中心版本号
|
||||
func (s *NotifBcstCenter) GetStreamerNotifBcstCenterVers() (int64, error) {
|
||||
|
||||
}
|
||||
|
||||
// 获取用户全局消息中心版本号
|
||||
func (s *NotifBcstCenter) GetUserNotifBcstCenterVers() (int64, error) {
|
||||
|
||||
}
|
||||
|
||||
// 写入一条主播全局广播消息
|
||||
func (s *NotifBcstCenter) BcstANotifToAllStreamers() error {
|
||||
|
||||
}
|
||||
|
||||
// 写入一条用户全局广播消息
|
||||
func (s *NotifBcstCenter) BcstANotifToAllUsers() error {
|
||||
|
||||
}
|
||||
|
||||
// 写入一条主播和用户全局广播消息
|
||||
func (s *NotifBcstCenter) BcstANotifToAllStreamersAndUsers() error {
|
||||
|
||||
}
|
||||
|
||||
// 主播获取全局广播消息
|
||||
func (s *NotifBcstCenter) ReceiveAllBcstedNotifsAsStreamer(mid int64) error {
|
||||
// 获取该主播已接收的全局广播版本号
|
||||
|
||||
// 获取当前主播全局广播的版本号
|
||||
|
||||
// 如果版本号一致,则认为无需再接收新的广播
|
||||
|
||||
// 如果版本号不一致看,则接收新广播的消息
|
||||
}
|
||||
|
||||
// 用户获取全局广播消息
|
||||
func (s *NotifBcstCenter) ReceiveAllBcstedNotifsAsUser(mid int64) error {
|
||||
|
||||
}
|
Loading…
Reference in New Issue