Documentation
¶
Index ¶
- func BroadcastMessage(channel, message string)
- func GetChannelConnections(channel string) int
- func GetSseMsgStr(event string, data interface{}) string
- func HandleSSE(r *ghttp.Request)
- func HasChannelConnections(channel string) bool
- func RegisterChannelHandler(channel string, handler ChannelHandler)
- func StartAutoSend(channel string, interval time.Duration, fn func())
- func StopAutoSend(channel string)
- type ChannelHandler
- type SSEMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastMessage ¶
func BroadcastMessage(channel, message string)
func GetChannelConnections ¶
func GetSseMsgStr ¶
func HasChannelConnections ¶
func RegisterChannelHandler ¶
func RegisterChannelHandler(channel string, handler ChannelHandler)
func StartAutoSend ¶
func StopAutoSend ¶
func StopAutoSend(channel string)
Types ¶
type ChannelHandler ¶
Click to show internal directories.
Click to hide internal directories.