Documentation ¶ Index ¶ Variables type EventBus func Instance() *EventBus func (e *EventBus) Producer(handler any, params ...any) error type Task Constants ¶ This section is empty. Variables ¶ View Source var ( ErrTaskNotFunc = fmt.Errorf("handler must be a function") ErrNumberOfParameters = fmt.Errorf("number of provided parameters does not match expected") ErrTypeOfParameters = fmt.Errorf("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) 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.go mission.go Click to show internal directories. Click to hide internal directories.