Version: v0.2.1 Latest Latest

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

Go to latest
Published: Oct 25, 2014 License: MIT Imports: 3 Imported by: 0




This section is empty.


This section is empty.


func Dispatch

func Dispatch(command commands.CommandResponse)

Dispatch dispatches a CommandResponse to every handler in the registry

func RegisterHandler

func RegisterHandler(f HandleFunc)

RegisterHandler registers a HandleFunc f to receive a CommandResponse when one is sent to the system.

func RunLoop added in v0.2.1

func RunLoop(outChannels *connection.Out)

RunLoop starts a loop that receives CommandResponses and dispatches them. This is a helper method, but you could just implement your own, if you only need this loop to be the blocking loop. For Instance, in a HTTP Server setting, you might want to run this as a goroutine and then let the servers blocking handler keep the process open. As long as there are commands in the channel, this loop will dispatch as fast as possible, when all commands are exhausted this loop will run on iterations of 10 microseconds optimistically.


type HandleFunc added in v0.2.1

type HandleFunc func(commands.CommandResponse)

Source Files

Jump to

Keyboard shortcuts

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