evq

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 7 Imported by: 0

README

xxx

介绍
  1. xxxx
  2. xxxx
  3. xxxx
安装教程

go get github.com/jageros/hawox

使用例子
package main

import (
	"fmt"
	"github.com/jageros/hawox/xxx"
)

func main() {
	/*
	xxxxx
	xxxxx
	xxxxx
	*/
}
使用说明
  1. xxxx
  2. xxxx
  3. xxxx

Documentation

Index

Constants

View Source
const (
	COROUTINE_EVENT = 1
	CALLATER_EVT    = 2
	ClOSE_EVQ_EVT   = 3
)

Variables

This section is empty.

Functions

func Await

func Await(f func())

func CallLater

func CallLater(f func())

func CreateEventID

func CreateEventID() int

func HandleEvent

func HandleEvent(evid int, f func(event IEvent))

func Initialize

func Initialize(ctx contextx.Context)

func PostEvent

func PostEvent(ev IEvent)

Types

type CommonEvent

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

func NewCommonEvent

func NewCommonEvent(evenID int, data ...interface{}) *CommonEvent

func (*CommonEvent) GetData

func (ce *CommonEvent) GetData() []interface{}

func (*CommonEvent) GetEventId

func (ce *CommonEvent) GetEventId() int

func (*CommonEvent) String

func (ce *CommonEvent) String() string

type Coroutine

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

implement IEvent

func (*Coroutine) Exit

func (c *Coroutine) Exit()

func (*Coroutine) GetEventId

func (c *Coroutine) GetEventId() int

func (*Coroutine) Resume

func (c *Coroutine) Resume(data interface{})

func (*Coroutine) String

func (c *Coroutine) String() string

func (*Coroutine) Yield

func (c *Coroutine) Yield() interface{}

type IEvent

type IEvent interface {
	GetEventId() int
}

Jump to

Keyboard shortcuts

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