baton

package
v0.0.0-...-50289d0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: GPL-2.0, GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Module string      `json:"module"`
	Call   string      `json:"call"`
	ID     CommandID   `json:"id"`
	Body   interface{} `json:"body"`
}

type CommandID

type CommandID string

type Hub

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

func NewHub

func NewHub() Hub

func (Hub) Handler

func (h Hub) Handler() *mux.Router

func (*Hub) InitModules

func (h *Hub) InitModules(modules map[string]Module)

func (*Hub) Run

func (h *Hub) Run()

type Module

type Module interface {
	Init(cmd <-chan Command, resp chan<- Command)
}

type ModuleHandler

type ModuleHandler interface {
	Handler() *mux.Router
}

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

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