router

package
v0.0.0-...-9d1ce3d Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = logrus.New()

Logger logs but can be replaced

Functions

This section is empty.

Types

type Router

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

Router handles all incoming messages and uses storage to reroute those messages

func NewRouter

func NewRouter(messenger messenger.Messenger, storage storage.Storage, config RouterConfig) *Router

NewRouter returns a new router that routes messages in/out of messenger based on storage

func (*Router) Start

func (r *Router) Start()

Start begins the message routing Careful! Calling this multiple times will queue starts which can unexpectedly cancel out a stop calls

func (*Router) Stop

func (r *Router) Stop()

Stop stops message routing

type RouterConfig

type RouterConfig struct {
	TopicNames TopicNames
}

type TopicNames

type TopicNames map[string]string

TopicNames maps a routable type to a topic

Jump to

Keyboard shortcuts

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