defaultApp

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2014 mqant Author. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

func NewApp(version string) module.App

Types

type DefaultApp

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

func (*DefaultApp) AddRPCSerialize

func (app *DefaultApp) AddRPCSerialize(name string, Interface module.RPCSerialize) error

func (*DefaultApp) Configure

func (app *DefaultApp) Configure(settings conf.Config) error

func (*DefaultApp) GetJudgeGuest

func (app *DefaultApp) GetJudgeGuest() func(session gate.Session) bool

func (*DefaultApp) GetModuleInited

func (app *DefaultApp) GetModuleInited() func(app module.App, module module.Module)

func (*DefaultApp) GetProcessID

func (app *DefaultApp) GetProcessID() string

func (*DefaultApp) GetRPCSerialize

func (app *DefaultApp) GetRPCSerialize() map[string]module.RPCSerialize

func (*DefaultApp) GetRouteServer

func (app *DefaultApp) GetRouteServer(filter string, hash string) (s module.ServerSession, err error)

func (*DefaultApp) GetServerById

func (app *DefaultApp) GetServerById(serverId string) (module.ServerSession, error)

func (*DefaultApp) GetServersByType

func (app *DefaultApp) GetServersByType(Type string) []module.ServerSession

func (*DefaultApp) GetSettings

func (app *DefaultApp) GetSettings() conf.Config

func (*DefaultApp) NewProtocolMarshal

func (app *DefaultApp) NewProtocolMarshal(data []byte) module.ProtocolMarshal

func (*DefaultApp) OnConfigurationLoaded

func (app *DefaultApp) OnConfigurationLoaded(_func func(app module.App)) error

func (*DefaultApp) OnDestroy

func (app *DefaultApp) OnDestroy() error

func (*DefaultApp) OnInit

func (app *DefaultApp) OnInit(settings conf.Config) error

*

func (*DefaultApp) OnModuleInited

func (app *DefaultApp) OnModuleInited(_func func(app module.App, module module.Module)) error

func (*DefaultApp) OnStartup

func (app *DefaultApp) OnStartup(_func func(app module.App)) error

func (*DefaultApp) ProtocolMarshal

func (app *DefaultApp) ProtocolMarshal(Result interface{}, Error string) (module.ProtocolMarshal, string)

func (*DefaultApp) RegisterLocalClient

func (app *DefaultApp) RegisterLocalClient(serverId string, server mqrpc.RPCServer) error

func (*DefaultApp) Route

func (app *DefaultApp) Route(moduleType string, fn func(app module.App, Type string, hash string) module.ServerSession) error

func (*DefaultApp) RpcInvoke

func (app *DefaultApp) RpcInvoke(module module.RPCModule, moduleType string, _func string, params ...interface{}) (result interface{}, err string)

func (*DefaultApp) RpcInvokeArgs

func (app *DefaultApp) RpcInvokeArgs(module module.RPCModule, moduleType string, _func string, ArgsType []string, args [][]byte) (result interface{}, err string)

func (*DefaultApp) RpcInvokeNR

func (app *DefaultApp) RpcInvokeNR(module module.RPCModule, moduleType string, _func string, params ...interface{}) (err error)

func (*DefaultApp) RpcInvokeNRArgs

func (app *DefaultApp) RpcInvokeNRArgs(module module.RPCModule, moduleType string, _func string, ArgsType []string, args [][]byte) (err error)

func (*DefaultApp) Run

func (app *DefaultApp) Run(debug bool, mods ...module.Module) error

func (*DefaultApp) SetJudgeGuest

func (app *DefaultApp) SetJudgeGuest(_func func(session gate.Session) bool) error

func (*DefaultApp) SetMapRoute added in v1.8.0

func (app *DefaultApp) SetMapRoute(fn func(app module.App, route string) string) error

func (*DefaultApp) SetProtocolMarshal

func (app *DefaultApp) SetProtocolMarshal(protocolMarshal func(Result interface{}, Error string) (module.ProtocolMarshal, string)) error

Jump to

Keyboard shortcuts

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