1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00
2016-09-12 21:33:14 +02:00

14 lines
302 B
Go

package gobot
// Event represents when something asyncronous happens in a Driver
// or Adaptor
type Event struct {
Name string
Data interface{}
}
// NewEvent returns a new Event and its associated data.
func NewEvent(name string, data interface{}) *Event {
return &Event{Name: name, Data: data}
}