eventbus

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventbus

func CreateEventbus() *eventbus

创建一个事件管理工厂

func DispatchEvent

func DispatchEvent(event string, args ...interface{})

*

  • 异步分发消息

func FuzzyDispatchEvent

func FuzzyDispatchEvent(eventPre string, args ...interface{})

*

  • 模糊匹配分发消息

func FuzzyPublishEvent

func FuzzyPublishEvent(eventPre string, args ...interface{})

*

  • 模糊匹配分发消息

func PublishEvent

func PublishEvent(event string, args ...interface{})

*

  • 同步分发消息

func RegisterEventListener

func RegisterEventListener(event string, listener EventListener) bool

func RemoveEventListener

func RemoveEventListener(event string, listener EventListener)

Types

type EventListener

type EventListener func(event string, args ...interface{})

Jump to

Keyboard shortcuts

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