Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAcceptedNonEvent = errors.New("did not receive an event")
Functions ¶
This section is empty.
Types ¶
type QMPEvent ¶
type QMPEvent[T utils.ComparableStringer] struct { Event T `json:"event"` Data any `json:"data"` Timestamp time.Time `json:"timestamp"` }
type QMPEventMonitor ¶
type QMPEventMonitor[T utils.ComparableStringer] struct { // contains filtered or unexported fields }
func NewQMPEventMonitor ¶
func NewQMPEventMonitor[T utils.ComparableStringer](client io.ReadWriteCloser, types []T, typeMap map[T]reflect.Type) (*QMPEventMonitor[T], error)
func (*QMPEventMonitor[T]) Accept ¶
func (em *QMPEventMonitor[T]) Accept() (*QMPEvent[T], error)
Accept receives exactly one input event from the QMP service and then returns. The method will wait until it receives the event.
Click to show internal directories.
Click to hide internal directories.