queen

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LINK   = "sys:link"
	UNLINK = "sys:unlink"
	REMOVE = "sys:remove"
	HAND   = "sys:hand"
	HANDED = "sys:handed"
	ATTACH = "sys:attach"
	DETACH = "sys:detach"
	SEND   = "sys:send"
	RECV   = "sys:recv"
)

Variables

This section is empty.

Functions

func GetI32

func GetI32(b []byte, pos int) int32

func InitConnect

func InitConnect(queen *Queen)

Types

type CContext

type CContext struct {
	Center   *Center
	Id       int32
	Key      string
	OldValue nson.Value
	Value    nson.Value
}

type CHandler

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

type Center

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

func NewCenter

func NewCenter() Center

func (*Center) All

func (self *Center) All(fn func(CContext)) (id int32)

func (*Center) Get

func (self *Center) Get(key string) (nson.Value, bool)

func (*Center) InitCenter

func (self *Center) InitCenter()

func (*Center) Insert

func (self *Center) Insert(key string, value nson.Value) (nson.Value, bool)

func (*Center) Off

func (self *Center) Off(id int32) (ok bool)

func (*Center) On

func (self *Center) On(key string, fn func(CContext)) (id int32)

func (*Center) Remove

func (self *Center) Remove(key string) (nson.Value, bool)

func (*Center) Set

func (self *Center) Set(key string, value nson.Value) (nson.Value, bool)

type Context

type Context struct {
	Queen   *Queen
	Id      int32
	Event   string
	Message interface{}
}

type Handler

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

type Queen

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

func NewQueen

func NewQueen() Queen

func (*Queen) Emit

func (self *Queen) Emit(event string, message interface{})

func (*Queen) InitQueen

func (self *Queen) InitQueen()

func (*Queen) Off

func (self *Queen) Off(id int32) (ok bool)

func (*Queen) On

func (self *Queen) On(event string, fn func(Context)) (id int32)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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