Documentation
¶
Overview ¶
Package bussignal is what lys-shell's D-Bus signal readers share beyond dbusx's watches: the bus announcing that a name lost its owner, and the upkeep of a signal channel a reader holds itself because its signals come from paths or peers no watch can name ahead of time. Every channel owns the descriptors of the signals it is handed, so a reader that does not take them over discards each signal it has read and takes its channel off the connection with Remove.
Index ¶
- func Discard(sig *dbus.Signal)
- func OnNameLost(lost func(name string, announced dbus.Sequence) error) dbusx.Route
- func Remove(conn *dbus.Conn, signals chan *dbus.Signal)
- func Ticks(ctx context.Context, conn *dbus.Conn, from dbusx.Sender, what string, ...) (ticks <-chan struct{}, stop func(), err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Discard ¶
Discard closes the descriptors sig carries, for the reader of a channel that has read it and takes none of them over. A signal without descriptors costs nothing.
func OnNameLost ¶
OnNameLost routes the bus's announcement that a name lost its owner to lost, in a watch of dbusx.FromBus: a well-known name released, or the unique name of a peer that left the bus. lost also gets the announcement's sequence on the connection, which orders the loss against a reply the name's owner sent (dbus.Call.ResponseSequence): an answer sequenced before it came from an owner that has left since. WithArg0 narrows the route to one name.
func Ticks ¶
func Ticks(ctx context.Context, conn *dbus.Conn, from dbusx.Sender, what string, routes func(tick func()) []dbusx.Route) (ticks <-chan struct{}, stop func(), err error)
Ticks is a watch as a feed of ticks: routes builds the watch's routes around tick, which a handler calls for a signal that changed what the caller reads. One tick is pending at most. The feed closes once the watch has ended, with ctx, with stop or with the connection; stop returns once the watch has taken its match rules off conn. A signal that does not decode is logged under what.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bussignaltest holds what the tests of lys-shell's signal readers share: a descriptor to send in a signal, and the proof that every copy of it the bus handed the process was closed again.
|
Package bussignaltest holds what the tests of lys-shell's signal readers share: a descriptor to send in a signal, and the proof that every copy of it the bus handed the process was closed again. |