Documentation ¶ Index ¶ Variables type EventBus func Instance() *EventBus func (e *EventBus) Close() func (e *EventBus) Producer(handler any, params ...any) error type Task Constants ¶ This section is empty. Variables ¶ View Source var ( ErrTaskNotFunc = errors.New("handler must be a function") ErrNumberOfParameters = errors.New("number of provided parameters does not match expected") ErrTypeOfParameters = errors.New("type of provided parameters does not match expected") ) Functions ¶ This section is empty. Types ¶ type EventBus ¶ type EventBus struct { // contains filtered or unexported fields } 消息总线 func Instance ¶ func Instance() *EventBus func (*EventBus) Close ¶ added in v1.5.0 func (e *EventBus) Close() func (*EventBus) Producer ¶ func (e *EventBus) Producer(handler any, params ...any) error 参数:函数体与入参 type Task ¶ type Task struct { Handler reflect.Value // 函数体 Params []reflect.Value // 函数参数 } 消息体 Source Files ¶ View all Source files errors.gomission.go Click to show internal directories. Click to hide internal directories.