mission

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 // 函数参数
}

消息体

Jump to

Keyboard shortcuts

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