Documentation ¶
Index ¶
- func HashMd5(data string) string
- func InvalidName(in string) string
- func NewSkeleton() *module.Skeleton
- func TryCatch(f func()) (err error)
- type Assembly
- type Delegator
- type EffectBase
- type EffectCollector
- type EffectController
- type EffectCtrlMgr
- type EffectExecutor
- type EffectResponse
- type EventBase
- type EventCollector
- type IActivity
- type IAgent
- type IAssembly
- type ICommand
- type ICondition
- type IEffect
- type IEvent
- type IFMP
- type IFilter
- type IModule
- type IService
- type ISession
- type IStep
- type ITarget
- type IUserService
- type Mask
- func (its *Mask) Clone() *Mask
- func (its *Mask) Data() []uint32
- func (its *Mask) ForeachMask(fun func(int) bool)
- func (its *Mask) ForeachUnmask(fun func(int) bool)
- func (its *Mask) FromData(v []uint32) *Mask
- func (its *Mask) IsMask(i uint) bool
- func (its *Mask) SetMask(i uint) *Mask
- func (its *Mask) SetSize(n int) *Mask
- func (its *Mask) UnsetMask(i uint) *Mask
- type NoArg
- type NoReturn
- type SerialID
- type ServiceBase
- type ServiceCollector
- type Session
- func (its *Session) Active()
- func (its *Session) Agent() IAgent
- func (its *Session) Bind(a IAgent)
- func (its *Session) BindOff(k, o interface{}) error
- func (its *Session) BindOn(k, v, o interface{}) error
- func (its *Session) Close()
- func (its *Session) Dispatch(sender, event interface{})
- func (its *Session) Effect() *EffectCollector
- func (its *Session) Enable() bool
- func (its *Session) FindCondition(id uint64) interface{}
- func (its *Session) ForeachService(fun func(IUserService))
- func (its *Session) GetService(in interface{}) interface{}
- func (its *Session) IsPingTimeout() bool
- func (its *Session) IsTimeout() bool
- func (its *Session) KeepAlive()
- func (its *Session) LoadCondition(id uint64, ptr interface{}, ids []uint64, args ...interface{})
- func (its *Session) MakeCondition(id uint64, ptr interface{}, args ...interface{}) (result []uint64)
- func (its *Session) Off(k, v interface{}) error
- func (its *Session) On(k, v interface{}) error
- func (its *Session) Ping()
- func (its *Session) RemoveCondition(id uint64)
- func (its *Session) RoleID() uint64
- func (its *Session) UnBind(a IAgent)
- type StepBase
- type StepCollector
- type TypeInfo
- type TypeMember
- type UUID
- type UserService
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assembly ¶
type Assembly struct {
// contains filtered or unexported fields
}
Assembly Assembly
func (*Assembly) GetAllType ¶
GetAllType GetAllType
func (*Assembly) RegistType ¶
func (its *Assembly) RegistType(v interface{}, attrs ...interface{})
RegistType RegistType
type Delegator ¶
type Delegator struct {
// contains filtered or unexported fields
}
Delegator Delegator
type EffectBase ¶
type EffectBase struct { Value float64 // contains filtered or unexported fields }
EffectBase EffectBase
type EffectCollector ¶
type EffectCollector struct {
// contains filtered or unexported fields
}
EffectCollector EffectCollector
func NewEffectCollector ¶
func NewEffectCollector() *EffectCollector
NewEffectCollector NewEffectCollector
func (*EffectCollector) Controller ¶
func (its *EffectCollector) Controller(target, id interface{}, keys ...interface{}) func(source interface{}, args ...interface{}) *EffectResponse
Controller Controller
type EffectController ¶
type EffectController struct {
// contains filtered or unexported fields
}
EffectController EffectController
func NewEffectController ¶
func NewEffectController() *EffectController
NewEffectController NewEffectController
func (*EffectController) NewEffect ¶
func (its *EffectController) NewEffect(assembly IAssembly, name string, args ...interface{}) error
NewEffect NewEffect
func (*EffectController) Source ¶
func (its *EffectController) Source(source interface{}, keys ...interface{}) *EffectExecutor
Source Source
type EffectCtrlMgr ¶
type EffectCtrlMgr map[interface{}]*EffectController
EffectCtrlMgr EffectCtrlMgr
func (EffectCtrlMgr) Controller ¶
func (its EffectCtrlMgr) Controller(key interface{}) *EffectController
Controller Controller
type EffectExecutor ¶
type EffectExecutor struct {
// contains filtered or unexported fields
}
EffectExecutor EffectExecutor
func (*EffectExecutor) Do ¶
func (its *EffectExecutor) Do(args ...interface{}) (resp *EffectResponse)
Do Do
type EffectResponse ¶
type EffectResponse struct {
// contains filtered or unexported fields
}
EffectResponse EffectResponse
func (*EffectResponse) Result ¶
func (its *EffectResponse) Result(fun interface{}) error
Result Result
type EventBase ¶
type EventBase struct {
// contains filtered or unexported fields
}
EventBase EventBase
func NewEventBase ¶
NewEventBase NewEventBase
type EventCollector ¶
type EventCollector struct {
// contains filtered or unexported fields
}
EventCollector EventCollector
func NewEventCollector ¶
func NewEventCollector(s ISession) *EventCollector
NewEventCollector NewEventCollector
func (*EventCollector) Call ¶
func (its *EventCollector) Call(sender, event interface{}) error
Call Call
func (*EventCollector) Regist ¶
func (its *EventCollector) Regist(k, v interface{}) error
Regist Regist
func (*EventCollector) UnBind ¶
func (its *EventCollector) UnBind(k, o interface{}) error
UnBind UnBind
func (*EventCollector) UnRegist ¶
func (its *EventCollector) UnRegist(k, v interface{}) error
UnRegist UnRegist
type IActivity ¶
type IActivity interface { GetStatus() int32 MemberStatus(uint64) int32 SetMemberStatus(uint64, int32) }
IActivity IActivity
type IAgent ¶
type IAgent interface { SendBytes(bytes [][]byte) Send(int32, interface{}) UserData() interface{} SetUserData(interface{}) Close() }
IAgent IAgent
type IAssembly ¶
type IAssembly interface { New(string) interface{} FindType(string) *TypeInfo GetAllType() []*TypeInfo RegistType(interface{}, ...interface{}) }
IAssembly IAssembly
type ICondition ¶
type ICondition interface { Init(s ISession, args ...interface{}) []uint64 Load(s ISession, ids []uint64, args ...interface{}) Check(s ISession) bool OnRemove(s ISession) Step(s ISession) float64 }
ICondition ICondition
type IEffect ¶
type IEffect interface { Init(args ...interface{}) error Execute(args ...reflect.Value) []reflect.Value Work() interface{} }
IEffect IEffect
type IModule ¶
type IModule interface { AfterFunc(time.Duration, func()) *timer.Timer CronFunc(*timer.CronExpr, func()) *timer.Cron Go(func(), func()) RegisterChanRPC(interface{}, interface{}) ChanCall(interface{}, ...interface{}) }
IModule IModule
type ISession ¶
type ISession interface { Add(interface{}) GetService(interface{}) interface{} ForeachService(func(IUserService)) RoleID() uint64 Agent() IAgent Bind(IAgent) UnBind(IAgent) Ping() IsPingTimeout() bool IsTimeout() bool Close() Dispatch(sender, event interface{}) Off(k, v interface{}) error On(k, v interface{}) error BindOff(k, o interface{}) error BindOn(k, v, o interface{}) error KeepAlive() Effect() *EffectCollector Enable() bool Active() MakeCondition(id uint64, ptr interface{}, args ...interface{}) []uint64 LoadCondition(id uint64, ptr interface{}, ids []uint64, args ...interface{}) RemoveCondition(id uint64) FindCondition(id uint64) interface{} }
ISession ISession
type IStep ¶
type IStep interface { ZOrder() int Update(dt time.Duration) IsDone() bool Award(roleID uint64, pageID int, awardList, extraData string) error }
IStep IStep
type ITarget ¶
type ITarget interface {
AddEffect(mgr EffectCtrlMgr, args ...interface{})
}
ITarget ITarget
type IUserService ¶
type IUserService interface { OnLoad(ISession) OnLogin(ISession) OnLogout(ISession) OnUpdate(ISession) }
IUserService IUserService
type Mask ¶
type Mask struct {
// contains filtered or unexported fields
}
Mask Mask
func (*Mask) ForeachUnmask ¶
ForeachUnmask ForeachUnmask
type SerialID ¶
type SerialID struct {
// contains filtered or unexported fields
}
SerialID SerialID
type ServiceCollector ¶
type ServiceCollector struct {
// contains filtered or unexported fields
}
ServiceCollector ServiceCollector
func NewServiceCollector ¶
func NewServiceCollector() *ServiceCollector
NewServiceCollector NewServiceCollector
func (*ServiceCollector) FindService ¶
func (its *ServiceCollector) FindService(in interface{}) (interface{}, error)
FindService FindService
func (*ServiceCollector) GetAllService ¶
func (its *ServiceCollector) GetAllService() []IService
GetAllService GetAllService
func (*ServiceCollector) GetAllUserService ¶
func (its *ServiceCollector) GetAllUserService() []IUserService
GetAllUserService GetAllUserService
type Session ¶
type Session struct { *ServiceCollector // contains filtered or unexported fields }
Session Session
func NewSession ¶
NewSession NewSession
func (*Session) Dispatch ¶
func (its *Session) Dispatch(sender, event interface{})
Dispatch Dispatch
func (*Session) FindCondition ¶
FindCondition FindCondition
func (*Session) ForeachService ¶
func (its *Session) ForeachService(fun func(IUserService))
ForeachService ForeachService
func (*Session) GetService ¶
func (its *Session) GetService(in interface{}) interface{}
GetService GetService
func (*Session) IsPingTimeout ¶
IsPingTimeout IsPingTimeout
func (*Session) LoadCondition ¶
LoadCondition LoadCondition
func (*Session) MakeCondition ¶
func (its *Session) MakeCondition(id uint64, ptr interface{}, args ...interface{}) (result []uint64)
MakeCondition MakeCondition
func (*Session) RemoveCondition ¶
RemoveCondition RemoveCondition
type StepBase ¶
type StepBase struct {
// contains filtered or unexported fields
}
StepBase StepBase
type StepCollector ¶
type StepCollector struct {
// contains filtered or unexported fields
}
StepCollector StepCollector
func NewStepCollector ¶
func NewStepCollector(activity IActivity) *StepCollector
NewStepCollector NewStepCollector
func (*StepCollector) Init ¶
func (its *StepCollector) Init(assembly IAssembly, mp IFMP) *StepCollector
Init Init
type TypeInfo ¶
type TypeInfo struct {
// contains filtered or unexported fields
}
TypeInfo TypeInfo
func (*TypeInfo) GetAttributes ¶
func (its *TypeInfo) GetAttributes() (result []interface{})
GetAttributes GetAttributes
func (*TypeInfo) GetProperties ¶
func (its *TypeInfo) GetProperties() (result []*TypeMember)
GetProperties GetProperties
type TypeMember ¶
type TypeMember struct { Name string // contains filtered or unexported fields }
TypeMember TypeMember