router

package
v0.0.0-...-5dba8c9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2015 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

路由模块

Index

Constants

View Source
const (
	MESSAGE_TYPE_IDENTITY uint = iota
	MESSAGE_TYPE_AUTHENTICATE
	MESSAGE_TYPE_HEARTBEAT
	MESSAGE_TYPE_RECEIPT
	MESSAGE_TYPE_TRANSIENT
	MESSAGE_TYPE_GROUP
	MESSAGE_TYPE_EVENT
	MESSAGE_INTERN_TYPE_ONLINE
	MESSAGE_INTERN_TYPE_OFFLINE
	MESSAGE_INTERN_TYPE_TRANSIENT
	MESSAGE_TYPE_ERROR = 31
)

消息类型定义

View Source
const (
	MESSAGE_GROUP_JOIN   = "join"
	MESSAGE_GROUP_INVITE = "invite"
	MESSAGE_GROUP_SEND   = "send"
	MESSAGE_GROUP_LEAVE  = "leave"
)

群组消息类型定义

Variables

This section is empty.

Functions

func Handler

func Handler(config Config) error

Types

type Config

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

func NewConfig

func NewConfig(mainchan chan *message.Container, onlinetable *onlinetable.Container) Config

Returns config of router

type GroupBody

type GroupBody struct {
	Action  string      `json:"action"`
	BodyRaw interface{} `json:"data"`

	List []string
	Data string
}

群组消息内容结构

func GroupBodyDecode

func GroupBodyDecode(r io.Reader) (x *GroupBody, err error)

群组消息内容JSON解析

Directories

Path Synopsis
Transient消息队列
Transient消息队列

Jump to

Keyboard shortcuts

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