Documentation ¶
Index ¶
- Constants
- Variables
- func DumpService() string
- func Redirect(source Address, msg *Msg)
- func Ret(args ...interface{}) []interface{}
- func Run()
- type Address
- type Dispatch
- type Master
- type Msg
- type NULL
- type Node
- type Queue
- type Service
- func (s *Service) Call(query interface{}, ptype uint8, args ...interface{}) []interface{}
- func (s *Service) Notify(query interface{}, ptype uint8, args ...interface{})
- func (s *Service) NotifySelf(ptype uint8, args ...interface{})
- func (s *Service) Push(msg *Msg)
- func (s *Service) RegisterProtocol(ptype uint8, start Start, args ...interface{})
- func (s *Service) Send(query interface{}, ptype uint8, args ...interface{}) chan *Msg
- func (s *Service) Start(i int)
- func (s *Service) Status() int
- func (s *Service) Stop() bool
- func (s *Service) String() string
- type Start
- type Timer
Constants ¶
View Source
const ( PTYPE_GO uint8 = iota //service -> service PTYPE_MULTICAST //multicast -> service PTYPE_CLIENT //client -> gate PTYPE_RESPONSE //gate -> client )
View Source
const ( TIME_NEAR_SHIFT = 8 TIME_NEAR = 1 << TIME_NEAR_SHIFT TIME_LEVEL_SHIFT = 6 TIME_LEVEL = 1 << TIME_LEVEL_SHIFT TIME_NEAR_MASK = TIME_NEAR - 1 TIME_LEVEL_MASK = TIME_LEVEL - 1 )
View Source
const (
CHAM_STOP uint8 = iota
)
View Source
const (
DEFAULT_QUEUE_SIZE = 64
)
View Source
const (
DEFAULT_SERVICE_SIZE = 64
)
View Source
const (
DEFAULT_SERVICE_WORKER int = 1
)
Variables ¶
View Source
var ( NULLVALUE = NULL{} NORET []interface{} )
View Source
var START_ADDR uint32 = 1
Functions ¶
func DumpService ¶
func DumpService() string
Types ¶
type Master ¶
func (*Master) AllService ¶
func (*Master) GetService ¶
func (*Master) UniqueService ¶
func (*Master) Unregister ¶
type Service ¶
var Main *Service
func NewService ¶
args[0] is worker number, args[1:] will pass to start
func UniqueService ¶
create or return already name
func (*Service) NotifySelf ¶
func (*Service) RegisterProtocol ¶
Click to show internal directories.
Click to hide internal directories.