chat

package
v0.0.0-...-ce26905 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2014 mqantserver 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.

* 一定要记得在confin.json配置这个模块的参数,否则无法使用

Index

Constants

This section is empty.

Variables

View Source
var Module = func() module.Module {
	chat := new(Chat)
	return chat
}

Functions

This section is empty.

Types

type Chat

type Chat struct {
	basemodule.BaseModule
	// contains filtered or unexported fields
}

func (*Chat) GetType

func (m *Chat) GetType() string

func (*Chat) OnDestroy

func (m *Chat) OnDestroy()

func (*Chat) OnInit

func (m *Chat) OnInit(app module.App, settings *conf.ModuleSettings)

func (*Chat) Run

func (m *Chat) Run(closeSig chan bool)

func (*Chat) Version

func (m *Chat) Version() string

type Listener

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

func (*Listener) BeforeHandle

func (l *Listener) BeforeHandle(fn string, callInfo *mqrpc.CallInfo) error

func (*Listener) NoFoundFunction

func (l *Listener) NoFoundFunction(fn string) (*mqrpc.FunctionInfo, error)

func (*Listener) OnComplete

func (l *Listener) OnComplete(fn string, callInfo *mqrpc.CallInfo, result *rpcpb.ResultInfo, exec_time int64)

* fn 方法名 params 参数 result 执行结果 exec_time 方法执行时间 单位为 Nano 纳秒 1000000纳秒等于1毫秒

func (*Listener) OnError

func (l *Listener) OnError(fn string, callInfo *mqrpc.CallInfo, err error)

func (*Listener) OnTimeOut

func (l *Listener) OnTimeOut(fn string, Expired int64)

Jump to

Keyboard shortcuts

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