Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
func NewNotification ¶
func NewNotification() *Notification
NewNotification returns a new Notification
func (*Notification) ListenEndOfFile ¶
func (n *Notification) ListenEndOfFile(ctx context.Context, handleEndOfFileEvent func() error)
ListenEndOfFile listens for file download completion events. Upon receiving an event, it will trigger the corresponding callback method to handle the event `handleEndOfFileEvent`. Once the callback method finishes processing, a notification will be sent to the `finished` channel, signaling the completion of the event handling.
func (*Notification) SendEndOfFileEvent ¶
func (n *Notification) SendEndOfFileEvent()
SendEndOfFileEvent notifies a file download is completed.
Click to show internal directories.
Click to hide internal directories.