Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event[T any] interface { UnRegister(service, model string, handler Handler[T]) Register(service, model string, handler Handler[T]) error RegisterFunc(service, model string, handler func(T)) Handler[T] Emit(service, model string, msg T) error }
func NewSingleService ¶
type MutiEventMsg ¶
type MutiEventMsg interface {
GetId() string
}
type MutiEventServ ¶
type MutiEventServ interface {
Emit(service, model string, msg MutiEventMsg) error
Register(service, model, msgId string, handler trans.Trans) error
UnRegister(service, model, msgId string, handler trans.Trans)
Run(context.Context)
}
func NewMultiService ¶
func NewMultiService(cfg *config.Config) (MutiEventServ, error)
Click to show internal directories.
Click to hide internal directories.