localmsg

package
v0.0.0-...-5a65518 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgData

type MsgData struct {
	Type      MsgType
	Data      any   //msg data
	Timestamp int64 //unit timestamp
	Do        func()
}

local msg data struct

func (MsgData) GetData

func (msg MsgData) GetData(val interface{}) error

func (MsgData) String

func (msg MsgData) String() (string, error)

type MsgQueue

type MsgQueue struct {
	// contains filtered or unexported fields
}

func New

func New() *MsgQueue

func (*MsgQueue) SendAsync

func (m *MsgQueue) SendAsync(msg MsgData)

异步发送

func (*MsgQueue) SendSync

func (m *MsgQueue) SendSync(msg MsgData)

同步发送

func (*MsgQueue) Start

func (m *MsgQueue) Start()

func (*MsgQueue) Stop

func (m *MsgQueue) Stop()

type MsgType

type MsgType int

local msg type

Jump to

Keyboard shortcuts

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