Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Name string Payload interface{} Option EventOption }
Event structure
func NewEventWithOption ¶
func NewEventWithOption(name string, payload interface{}, option EventOption) *Event
NewEventWithOption create new event with option
type EventOption ¶
type EventOption byte
EventOption is a set of event option.
func (*EventOption) AddIf ¶
func (opts *EventOption) AddIf(opt EventOption, condition bool)
AddIf adds event option if condition is valid
func (EventOption) Has ¶
func (opts EventOption) Has(opt EventOption) bool
Has test if event options contains this option
Click to show internal directories.
Click to hide internal directories.