v0.9.0
Fixed:
Notifier.Close()
: Should not close the underlyingdbus.Conn
that is owned by caller.
Breaking changes:
Changes:
- requires go
1.13
forfmt.Errorf(%w)
formatting Notifier.CloseNotification(id int)
is nowCloseNotification(id uint32)
to be in line with theuint32
IDs returned.
Removed:
NotificationClosed() <-chan *NotificationClosedSignal
ActionInvoked() <-chan *ActionInvokedSignal
Removed interface methods producing chan
s because most users found it awkward to use.
Added callback functions instead.
Added:
- Added callback functions instead of methods returning a shared
chan
:NotificationClosedHandler
: called when we receive a NotificationClosed signalActionInvokedHandler
: called when we receive a signal that one of the action_keys was invokedNew(...)
:WithOnAction
andWithOnClose
options that lets you give a custom handler function.
The new callback based handler design fixes a few issues as well. It is now safe to create a instance without draining the output channel and we no longer need to spawn new goroutines just to avoid blocking even if the consumer is not interested in signals.