1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00

14 lines
303 B
Go
Raw Permalink Normal View History

2014-06-11 11:37:20 -07:00
package gobot
2017-09-23 14:16:19 +05:30
// Event represents when something asynchronous happens in a Driver
// or Adaptor
2014-06-11 11:37:20 -07:00
type Event struct {
Name string
Data interface{}
2014-06-11 11:37:20 -07:00
}
// NewEvent returns a new Event and its associated data.
func NewEvent(name string, data interface{}) *Event {
return &Event{Name: name, Data: data}
2014-06-11 11:37:20 -07:00
}