Files
mayfly-go/server/internal/msg/application/application.go

22 lines
560 B
Go
Raw Normal View History

2023-07-03 21:42:04 +08:00
package application
import (
2025-04-15 21:42:31 +08:00
_ "mayfly-go/internal/msg/msgx/sender" // 注册消息发送器
2024-01-21 22:52:20 +08:00
"mayfly-go/pkg/ioc"
2023-07-03 21:42:04 +08:00
)
func InitIoc() {
2024-01-21 22:52:20 +08:00
ioc.Register(new(msgAppImpl), ioc.WithComponentName("MsgApp"))
2025-04-15 21:42:31 +08:00
ioc.Register(new(msgChannelAppImpl), ioc.WithComponentName("MsgChannelApp"))
ioc.Register(new(msgTmplAppImpl), ioc.WithComponentName("MsgTmplApp"))
ioc.Register(new(msgTmplBizAppImpl), ioc.WithComponentName("MsgTmplBizApp"))
2024-01-21 22:52:20 +08:00
}
2023-07-03 21:42:04 +08:00
func GetMsgApp() Msg {
2024-01-21 22:52:20 +08:00
return ioc.Get[Msg]("MsgApp")
2023-07-03 21:42:04 +08:00
}
func GetMsgTmplApp() MsgTmpl {
return ioc.Get[MsgTmpl]("MsgTmplApp")
}