Documentation ¶
Index ¶
- Constants
- func FindHandler(eventid string, ObjectType string) eventiface.IEventHandler
- func FindHandlerNats(eventid string) eventiface.IEventHandler
- func InjectGoEvent(s *GoEvent)
- func LoadGoEvent() baseiface.ISingleton
- func RegisterHandler(eventid string, ObjectType string, handler eventiface.IEventHandler)
- func RegisterHandlerES(eventid string, handler eventiface.IEventHandler)
- func RegisterHandlerNats(eventid string, handler eventiface.IEventHandler)
- func UnRegisterHandler(eventid string, ObjectType string)
- type EventContainer
- type GoEvent
Constants ¶
View Source
const ( GOEvent_Type_NATS = "NATS" GOEvent_Type_ES = "ES" GOEvent_Type_WEB = "WEB" GOEvent_Type_GOMSG = "GoMsg" )
Variables ¶
This section is empty.
Functions ¶
func FindHandler ¶
func FindHandler(eventid string, ObjectType string) eventiface.IEventHandler
func FindHandlerNats ¶
func FindHandlerNats(eventid string) eventiface.IEventHandler
func InjectGoEvent ¶
func InjectGoEvent(s *GoEvent)
func LoadGoEvent ¶
func LoadGoEvent() baseiface.ISingleton
func RegisterHandler ¶
func RegisterHandler(eventid string, ObjectType string, handler eventiface.IEventHandler)
func RegisterHandlerES ¶
func RegisterHandlerES(eventid string, handler eventiface.IEventHandler)
func RegisterHandlerNats ¶
func RegisterHandlerNats(eventid string, handler eventiface.IEventHandler)
func UnRegisterHandler ¶
Types ¶
type EventContainer ¶
type EventContainer struct {
// contains filtered or unexported fields
}
func NewEventContainer ¶
func NewEventContainer() *EventContainer
func (*EventContainer) FindHandler ¶
func (self *EventContainer) FindHandler(eventid string, ObjectType string) eventiface.IEventHandler
func (*EventContainer) RegisterHandler ¶
func (self *EventContainer) RegisterHandler(eventId string, ObjectType string, handler eventiface.IEventHandler)
func (*EventContainer) UnRegisterHandler ¶
func (self *EventContainer) UnRegisterHandler(eventId string, ObjectType string)
type GoEvent ¶
type GoEvent struct { basedto.BaseEntity //事件id EventId string `json:"event_id"` //事件名称 EventName string `json:"event_name"` //事件类型:可以是聚合根名称 ObjectType string `json:"object_type"` //事件处理器 Handler eventiface.IEventHandler `json:"-"` }
func NewGoEvent ¶
func NewGoEvent() *GoEvent
Click to show internal directories.
Click to hide internal directories.