Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrConsumeFailed ¶
type ErrConsumeFailed struct {
Reason error
}
Bus connected consumer failed to consume events
func (ErrConsumeFailed) Error ¶
func (e ErrConsumeFailed) Error() string
type ErrProduceFailed ¶
type ErrProduceFailed struct {
Reason error
}
Bus connected provider failed to provide events
func (ErrProduceFailed) Error ¶
func (e ErrProduceFailed) Error() string
type Event ¶
type Event struct { Target string `json:"target"` Category EventCategory `json:"category"` Name string `json:"name"` Time time.Time `json:"time"` Data interface{} `json:"data,omitempty"` }
type EventCategory ¶
type EventCategory string
const ( CategorySystem EventCategory = "system" CategoryModel EventCategory = "model" CategoryEvent EventCategory = "event" )
Event categories
func (EventCategory) IsCustom ¶
func (ec EventCategory) IsCustom() bool
Test if the event category is custom
func (EventCategory) IsEvent ¶
func (ec EventCategory) IsEvent() bool
Test if the event category is event
func (EventCategory) IsModel ¶
func (ec EventCategory) IsModel() bool
Test if the event category is model
func (EventCategory) IsSystem ¶
func (ec EventCategory) IsSystem() bool
Test if the event category is system
Click to show internal directories.
Click to hide internal directories.