event

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnAcceptEvent  = "endpoint_accept"
	OnReceiveEvent = "endpoint_receive"
	OnConnectEvent = "endpoint_connect"
	OnCloseEvent   = "endpoint_close"
)

Variables

This section is empty.

Functions

func NewEventPlugin

func NewEventPlugin() *eventPlugin

Types

type OnAccept

type OnAccept struct {
	Session drpc.EarlySession
	// contains filtered or unexported fields
}

func (*OnAccept) Abort

func (that *OnAccept) Abort(abort bool)

Abort 设置事件是否终止

func (*OnAccept) Data

func (that *OnAccept) Data() map[interface{}]interface{}

Data 获取事件的全部参数

func (*OnAccept) Get

func (that *OnAccept) Get(_ interface{}) interface{}

func (*OnAccept) IsAborted

func (that *OnAccept) IsAborted() bool

IsAborted 判断事件是否终止

func (*OnAccept) Name

func (that *OnAccept) Name() string

func (*OnAccept) Set

func (that *OnAccept) Set(_ interface{}, _ interface{})

Set 设置元素

func (*OnAccept) SetData

func (that *OnAccept) SetData(_ map[interface{}]interface{}) eventbus.IEvent

SetData 设置事件的全部参数

type OnClose

type OnClose struct {
	Session drpc.BaseSession
	// contains filtered or unexported fields
}

func (*OnClose) Abort

func (that *OnClose) Abort(abort bool)

Abort 设置事件是否终止

func (*OnClose) Data

func (that *OnClose) Data() map[interface{}]interface{}

Data 获取事件的全部参数

func (*OnClose) Get

func (that *OnClose) Get(_ interface{}) interface{}

func (*OnClose) IsAborted

func (that *OnClose) IsAborted() bool

IsAborted 判断事件是否终止

func (*OnClose) Name

func (that *OnClose) Name() string

func (*OnClose) Set

func (that *OnClose) Set(_ interface{}, _ interface{})

Set 设置元素

func (*OnClose) SetData

func (that *OnClose) SetData(_ map[interface{}]interface{}) eventbus.IEvent

SetData 设置事件的全部参数

type OnConnect

type OnConnect struct {
	Session   drpc.EarlySession
	IsSuccess bool
	Err       error
	IsRedial  bool
	// contains filtered or unexported fields
}

func (*OnConnect) Abort

func (that *OnConnect) Abort(abort bool)

Abort 设置事件是否终止

func (*OnConnect) Data

func (that *OnConnect) Data() map[interface{}]interface{}

Data 获取事件的全部参数

func (*OnConnect) Get

func (that *OnConnect) Get(_ interface{}) interface{}

func (*OnConnect) IsAborted

func (that *OnConnect) IsAborted() bool

IsAborted 判断事件是否终止

func (*OnConnect) Name

func (that *OnConnect) Name() string

func (*OnConnect) Set

func (that *OnConnect) Set(_ interface{}, _ interface{})

Set 设置元素

func (*OnConnect) SetData

func (that *OnConnect) SetData(_ map[interface{}]interface{}) eventbus.IEvent

SetData 设置事件的全部参数

type OnReceive

type OnReceive struct {
	ReadCtx drpc.ReadCtx
	// contains filtered or unexported fields
}

func (*OnReceive) Abort

func (that *OnReceive) Abort(abort bool)

Abort 设置事件是否终止

func (*OnReceive) Data

func (that *OnReceive) Data() map[interface{}]interface{}

Data 获取事件的全部参数

func (*OnReceive) Get

func (that *OnReceive) Get(_ interface{}) interface{}

func (*OnReceive) IsAborted

func (that *OnReceive) IsAborted() bool

IsAborted 判断事件是否终止

func (*OnReceive) Name

func (that *OnReceive) Name() string

func (*OnReceive) Set

func (that *OnReceive) Set(_ interface{}, _ interface{})

Set 设置元素

func (*OnReceive) SetData

func (that *OnReceive) SetData(_ map[interface{}]interface{}) eventbus.IEvent

SetData 设置事件的全部参数

Jump to

Keyboard shortcuts

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