Redmage/api/events.go

11 lines
257 B
Go

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
}