hybridgroup.gobot/event.go

14 lines
302 B
Go
Raw Normal View History

2014-06-12 02:37:20 +08:00
package gobot
// Event represents when something asyncronous happens in a Driver
// or Adaptor
2014-06-12 02:37:20 +08:00
type Event struct {
Name string
Data interface{}
2014-06-12 02:37:20 +08: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-12 02:37:20 +08:00
}