Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceManager ¶
type DeviceManager struct{}
DeviceManager allows for listing event devices.
func (*DeviceManager) ListDevices ¶
func (dm *DeviceManager) ListDevices() ([]Device, error)
ListDevices provides a set of available event devices.
type InputEvent ¶
InputEvent represents an input device event. Input code can be mapped to strings using KeyMapper.
type KeyMapper ¶
type KeyMapper struct{}
KeyMapper is responsible for mapping uint codes to human readable labels.
type KeyRecorder ¶
type KeyRecorder struct{}
KeyRecorder is responsible for recoding key hits.
func (*KeyRecorder) Record ¶
func (kr *KeyRecorder) Record(options *RecorderOptions) error
Record method observes incoming events, maps them to key hits and stores in the log file.
type Logger ¶
type Logger interface {
Error(string)
}
Logger exposes an interface to collect errors.
type ProcessingError ¶
ProcessingError wraps runtime error with processing status.
type RecorderOptions ¶
type RecorderOptions struct {
ShutdownCh <-chan struct{}
Logger Logger
EventPath string
LogPath string
}
RecorderOptions stores configuration options of the KeyRecorder.
Click to show internal directories.
Click to hide internal directories.