FlyMsg

package
v0.0.0-...-b9c81f1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Off

func Off(key string)

func OffMsg

func OffMsg(msg *Msg)

func On

func On(key string, f func(data any))

func OnMsg

func OnMsg(msg *Msg)

func Send

func Send(key string, data any)

func SendMsg

func SendMsg(msg *Msg)

Types

type FlyMessager

type FlyMessager struct {
	sync.Mutex
	// contains filtered or unexported fields
}
var (
	Messager *FlyMessager
)

func NewFlyMessager

func NewFlyMessager() *FlyMessager

func (*FlyMessager) Off

func (d *FlyMessager) Off(key string)

func (*FlyMessager) OffMsg

func (d *FlyMessager) OffMsg(msg *Msg)

func (*FlyMessager) On

func (d *FlyMessager) On(key string, f func(data any))

func (*FlyMessager) OnMsg

func (d *FlyMessager) OnMsg(msg *Msg)

func (*FlyMessager) Send

func (d *FlyMessager) Send(key string, data any)

func (*FlyMessager) SendMsg

func (d *FlyMessager) SendMsg(msg *Msg)

type Msg

type Msg struct {
	Key  string
	Func func(data any)
	Data any
}

Jump to

Keyboard shortcuts

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