basemodule

package
v0.0.0-...-6c6cd66 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(m *DefaultModule)

func LoadStatisticalMethod

func LoadStatisticalMethod(j string) map[string]*StatisticalMethod

func NewModuleSession

func NewModuleSession(app module.AppInterface, id string, Type string, client rpc.RPCClient) module.ModuleSession

func NewRpcServerModule

func NewRpcServerModule(app module.AppInterface, module module.Module, settings *conf.ModuleSettings) module.RpcServerModule

func Run

func Run(m *DefaultModule)

Types

type BaseModule

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

*

Implement FullModule except Module

func (*BaseModule) Destroy

func (m *BaseModule) Destroy()

func (*BaseModule) GetApp

func (m *BaseModule) GetApp() module.AppInterface

func (*BaseModule) GetExecuting

func (m *BaseModule) GetExecuting() int64

func (*BaseModule) GetModuleSetting

func (m *BaseModule) GetModuleSetting() *conf.ModuleSettings

func (*BaseModule) GetRouteServer

func (m *BaseModule) GetRouteServer(filter string, hash string) (module.ModuleSession, error)

func (*BaseModule) GetServer

func (m *BaseModule) GetServer() module.RpcServerModule

func (*BaseModule) GetServerId

func (m *BaseModule) GetServerId() string

func (*BaseModule) GetStatistical

func (m *BaseModule) GetStatistical() (statistical string, err error)

func (*BaseModule) GetSubclass

func (m *BaseModule) GetSubclass() module.FullModule

func (*BaseModule) OnAppConfigurationLoaded

func (m *BaseModule) OnAppConfigurationLoaded(app module.AppInterface)

func (*BaseModule) OnConfChanged

func (m *BaseModule) OnConfChanged(settings *conf.ModuleSettings)

func (*BaseModule) OnInit

func (m *BaseModule) OnInit(app module.AppInterface, subclass module.FullModule, settings *conf.ModuleSettings)

func (*BaseModule) RpcCall

func (m *BaseModule) RpcCall(moduleType string, _func string, params ...interface{}) ([]interface{}, error)

func (*BaseModule) RpcCallArgs

func (m *BaseModule) RpcCallArgs(moduleType string, _func string, ArgsType []string, Args [][]byte) ([]interface{}, error)

func (*BaseModule) RpcCallArgsNR

func (m *BaseModule) RpcCallArgsNR(moduleType string, _func string, ArgsType []string, Args [][]byte) (err error)

func (*BaseModule) RpcCallNR

func (m *BaseModule) RpcCallNR(moduleType string, _func string, params ...interface{}) (err error)

func (*BaseModule) RpcSyncCall

func (m *BaseModule) RpcSyncCall(moduleType string, _func string, params ...interface{}) (chan rpcpb.ResultInfo, error)

func (*BaseModule) RpcSyncCallArgs

func (m *BaseModule) RpcSyncCallArgs(moduleType string, _func string, ArgsType []string, Args [][]byte) (chan rpcpb.ResultInfo, error)

type DefaultModule

type DefaultModule struct {
	Mi       module.Module
	CloseSig chan bool
	Wg       sync.WaitGroup
	Settings *conf.ModuleSettings
}

type StatisticalMethod

type StatisticalMethod struct {
	Name        string //方法名
	StartTime   int64  //开始时间
	EndTime     int64  //结束时间
	MinExecTime int64  //最短执行时间
	MaxExecTime int64  //最长执行时间
	ExecTotal   int    //执行总次数
	ExecTimeout int    //执行超时次数
	ExecSuccess int    //执行成功次数
	ExecFailure int    //执行错误次数
}

Jump to

Keyboard shortcuts

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