Redmage/api/events.go

11 lines
257 B
Go
Raw Normal View History

2024-04-26 15:13:29 +07:00
package api
import (
"github.com/tigorlazuardi/redmage/api/bmessage"
)
func (api *API) SubscribeImageDownloadEvent() (<-chan bmessage.ImageDownloadMessage, func()) {
listener := api.downloadBroadcast.Listener(10)
return listener.Ch(), listener.Close
}