14 lines
302 B
Go
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}
|
|
}
|