router

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

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

Go to latest
Published: Jan 24, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router interface {
	Send(topic string, msg []byte) error
}

type SimpleRouter

type SimpleRouter struct {
	TopicManager comet.TopicProvidor   `inject`
	SessManager  comet.SessionProvidor `inject`

	NsqCli *gonsq.Producer `inject`
}

func NewSimpleRouter

func NewSimpleRouter(topicMgr comet.TopicProvidor, sessMgr comet.SessionProvidor, nsqCli *gonsq.Producer) *SimpleRouter

func (*SimpleRouter) Publish

func (r *SimpleRouter) Publish(msg comet.Message) error

func (*SimpleRouter) RouteGroupMsg

func (r *SimpleRouter) RouteGroupMsg(topic string, byteMsg []byte) error

func (*SimpleRouter) RouteSingleMsg

func (r *SimpleRouter) RouteSingleMsg(topic string, byteMsg []byte) error

func (*SimpleRouter) Send

func (r *SimpleRouter) Send(topic string, msg []byte) error

Jump to

Keyboard shortcuts

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