event

package
v0.0.0-...-f305655 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent = agent.Agent

type Component

type Component = component.Component

type ComponentEventMsg

type ComponentEventMsg struct {
	MsgType EventType
	Sender  Component
	Attach  interface{}
	Err     error
}

func (*ComponentEventMsg) GetSender

func (this *ComponentEventMsg) GetSender() interface{}

func (*ComponentEventMsg) GetType

func (this *ComponentEventMsg) GetType() EventType

func (*ComponentEventMsg) Reset

func (this *ComponentEventMsg) Reset()

type ComponentID

type ComponentID = component.ComponentID

type DataEventMsg

type DataEventMsg struct {
	MsgType EventType
	Sender  Agent
	TypeID  ProtoTypeID
	MsgData interface{}
}

func (*DataEventMsg) GetSender

func (this *DataEventMsg) GetSender() Agent

func (*DataEventMsg) GetType

func (this *DataEventMsg) GetType() EventType

func (*DataEventMsg) Reset

func (this *DataEventMsg) Reset()

type EventChan

type EventChan chan bool

type EventMsg

type EventMsg interface {
	GetType() EventType
	Reset()
}

type EventQueue

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

func NewEventQueue

func NewEventQueue() *EventQueue

func (*EventQueue) Get

func (this *EventQueue) Get(event_list []interface{}, count uint32) uint32

func (*EventQueue) Push

func (this *EventQueue) Push(event EventMsg)

func (*EventQueue) SemaChan

func (this *EventQueue) SemaChan() EventChan

func (*EventQueue) WaitNotify

func (this *EventQueue) WaitNotify() bool

func (*EventQueue) WaiterWake

func (this *EventQueue) WaiterWake()

type EventReceiver

type EventReceiver interface {
	PostEvent(EventType, Agent, ComponentID)
	PostData(EventType, ProtoTypeID, Agent, interface{})
	PushEventMsg(ev EventMsg)
}

type EventType

type EventType = int
const (
	EVENT_NONE EventType = iota
	EVENT_TCP_CONNECTED
	EVENT_TCP_CONNECT_FAILED
	EVENT_TCP_ACCEPTED
	EVENT_TCP_READ_MSG
	EVENT_TCP_READ
	EVENT_TCP_WRITE
	EVENT_TCP_CLOSED
	EVENT_MODULE_RPC
	EVENT_COMPONENT_CREATE
	EVENT_COMPONENT_ERROR
)

type ProtoTypeID

type ProtoTypeID = agent.ProtoTypeID

type RpcEventMsg

type RpcEventMsg struct {
	MsgType EventType
	Sender  Agent
	RpcName string
	Data    []interface{}
}

func (*RpcEventMsg) GetSender

func (this *RpcEventMsg) GetSender() Agent

func (*RpcEventMsg) GetType

func (this *RpcEventMsg) GetType() EventType

func (*RpcEventMsg) Reset

func (this *RpcEventMsg) Reset()

type SessionEventMsg

type SessionEventMsg struct {
	MsgType EventType
	Sender  Agent
	Cid     ComponentID
}

func (*SessionEventMsg) GetSender

func (this *SessionEventMsg) GetSender() Agent

func (*SessionEventMsg) GetType

func (this *SessionEventMsg) GetType() EventType

func (*SessionEventMsg) Reset

func (this *SessionEventMsg) Reset()

Jump to

Keyboard shortcuts

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