app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: Apache-2.0 Imports: 23 Imported by: 12

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(opts ...module.Option) 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) 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, opts ...selector.SelectOption) (s module.ServerSession, err error)

func (*DefaultApp) GetServerById

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

func (*DefaultApp) GetServerBySelector

func (app *DefaultApp) GetServerBySelector(serviceName string, opts ...selector.SelectOption) (module.ServerSession, error)

func (*DefaultApp) GetServersByType

func (app *DefaultApp) GetServersByType(serviceName 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) Options

func (app *DefaultApp) Options() module.Options

func (*DefaultApp) ProtocolMarshal

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

func (*DefaultApp) Registry

func (app *DefaultApp) Registry() registry.Registry

func (*DefaultApp) RpcCall

func (app *DefaultApp) RpcCall(ctx context.Context, moduleType, _func string, param mqrpc.ParamOption, opts ...selector.SelectOption) (result interface{}, errstr string)

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(mods ...module.Module) error

func (*DefaultApp) SetMapRoute

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

func (*DefaultApp) SetProtocolMarshal

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

func (*DefaultApp) Transport

func (app *DefaultApp) Transport() *nats.Conn

func (*DefaultApp) Watcher

func (app *DefaultApp) Watcher(node *registry.Node)

func (*DefaultApp) WorkDir

func (app *DefaultApp) WorkDir() string

Jump to

Keyboard shortcuts

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