qmp

package
v0.8.2-12-g85e67319 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

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.

type Timestamp

type Timestamp struct {
	Seconds      uint64 `json:"seconds"`
	Microseconds uint64 `json:"microseconds"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL