event

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 0 Imported by: 44

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicePaired

type DevicePaired struct{}

DevicePaired is emitted when transport paired with a device (e.g. iOS client successfully paired with the accessory)

type DeviceUnpaired

type DeviceUnpaired struct{}

DeviceUnpaired is emitted when pairing with a device is removed (e.g. iOS client removed the accessory from HomeKit)

type Emitter

type Emitter interface {

	// Emit emits the event to all listeners
	Emit(ev interface{})

	// AddListener adds a listener to the event stream
	AddListener(l EventListener)
}

Emitter emits events to listeners

func NewEmitter

func NewEmitter() Emitter

NewEmitter returns a new event emitter

type EventListener

type EventListener interface {
	Handle(e interface{})
}

EventListener handles events

Jump to

Keyboard shortcuts

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