eventcontainer

package
v1.0.1-rel-02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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

func UnRegisterHandler(eventid string, ObjectType string)

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 FindBeanGoEvent

func FindBeanGoEvent() *GoEvent

FindBeanGoEvent

func NewGoEvent

func NewGoEvent() *GoEvent

func (*GoEvent) Key

func (this *GoEvent) Key() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL