events

package
v0.0.0-...-98fa19b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object struct {
	// contains filtered or unexported fields
}
Object Interface interface {
	SetEvent(event any)   //接受任意类型的消息事件
	SetEventsCap(cap int) //设置消息事件数量
	Events() <-chan any   //信道先进先出队列存储事件信号
	HandleEvent()         //处理消息事件
}

func (*Object) Events

func (o *Object) Events() <-chan any

func (*Object) HandleEvent

func (o *Object) HandleEvent()

func (*Object) SetEvent

func (o *Object) SetEvent(event any)

func (*Object) SetEventsCap

func (o *Object) SetEventsCap(cap int)

SetEventsCap func NewObject() *Object { return &Object{event: make(chan any, 1000)} } func New() Interface { return NewObject() }

Jump to

Keyboard shortcuts

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