module

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

Destroy Destroy

func Init

func Init()

Init Init

func Register

func Register(mi Module)

Register Register

Types

type FrameSkeleton

type FrameSkeleton struct {
	Skeleton
	L Looper
}

FrameSkeleton rewrite Run of skeleton add default case

func (*FrameSkeleton) Run

func (s *FrameSkeleton) Run(closeSig chan bool)

Run Run

type Looper

type Looper interface {
	Update(dt time.Duration)
}

Looper looper interface

type Module

type Module interface {
	OnInit()
	OnDestroy()
	Run(closeSig chan bool)
}

Module Module

type Skeleton

type Skeleton struct {
	GoLen              int
	TimerDispatcherLen int
	AsynCallLen        int
	ChanRPCServer      *chanrpc.Server
	// contains filtered or unexported fields
}

Skeleton Skeleton

func (*Skeleton) AfterFunc

func (s *Skeleton) AfterFunc(d time.Duration, cb func()) *timer.Timer

AfterFunc AfterFunc

func (*Skeleton) AsynCall

func (s *Skeleton) AsynCall(server *chanrpc.Server, id interface{}, args ...interface{})

AsynCall AsynCall

func (*Skeleton) CronFunc

func (s *Skeleton) CronFunc(cronExpr *timer.CronExpr, cb func()) *timer.Cron

CronFunc CronFunc

func (*Skeleton) Go

func (s *Skeleton) Go(f func(), cb func())

Go Go

func (*Skeleton) Init

func (s *Skeleton) Init()

Init Init

func (*Skeleton) NewLinearContext

func (s *Skeleton) NewLinearContext() *g.LinearContext

NewLinearContext NewLinearContext

func (*Skeleton) RegisterChanRPC

func (s *Skeleton) RegisterChanRPC(id interface{}, f interface{})

RegisterChanRPC RegisterChanRPC

func (*Skeleton) RegisterCommand

func (s *Skeleton) RegisterCommand(name string, help string, f interface{})

RegisterCommand RegisterCommand

func (*Skeleton) Run

func (s *Skeleton) Run(closeSig chan bool)

Run Run

Jump to

Keyboard shortcuts

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