blocks

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2014 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockRoutine

func BlockRoutine(bi BlockInterface)

func ConnectionRoutine

func ConnectionRoutine(c *Connection)

Types

type AddChanMsg

type AddChanMsg struct {
	Route   string
	Channel chan *Msg
}

type Block

type Block struct {
	Id   string // the name of the block specifed by the user (like MyBlock)
	Kind string // the kind of block this is (like count, toFile, fromSQS)
	Desc string // the description of block ('counts the number of messages it has seen')

	BlockChans
	LogStreams
	// contains filtered or unexported fields
}

func (*Block) Broadcast

func (b *Block) Broadcast() chan interface{}

func (*Block) Build

func (b *Block) Build(c BlockChans)

func (*Block) CleanUp

func (b *Block) CleanUp()

func (*Block) Error

func (b *Block) Error(msg interface{})

func (*Block) GetBlock

func (b *Block) GetBlock() *Block

func (*Block) GetDef

func (b *Block) GetDef() *BlockDef

func (*Block) InRoute

func (b *Block) InRoute(routeName string) chan interface{}

func (*Block) Log

func (b *Block) Log(msg interface{})

func (*Block) QueryRoute

func (b *Block) QueryRoute(routeName string) chan chan interface{}

func (*Block) Quit

func (b *Block) Quit() chan interface{}

func (*Block) SetId

func (b *Block) SetId(Id string)

type BlockChans

type BlockChans struct {
	InChan    chan *Msg
	QueryChan chan *QueryMsg
	AddChan   chan *AddChanMsg
	DelChan   chan *Msg
	ErrChan   chan error
	QuitChan  chan bool
}

type BlockDef

type BlockDef struct {
	Type        string
	Desc        string
	InRoutes    []string
	QueryRoutes []string
	OutRoutes   []string
}

type BlockInterface

type BlockInterface interface {
	Setup()
	Run()
	CleanUp()
	Build(BlockChans)
	Quit() chan interface{}
	Broadcast() chan interface{}
	InRoute(string) chan interface{}
	QueryRoute(string) chan chan interface{}
	GetBlock() *Block
	GetDef() *BlockDef
	Log(interface{})
	Error(interface{})
	SetId(string)
}

type Connection

type Connection struct {
	Id      string
	ToRoute string
	BlockChans
	LogStreams
}

func (*Connection) Build

func (c *Connection) Build(chans BlockChans)

func (*Connection) CleanUp

func (c *Connection) CleanUp()

func (*Connection) SetId

func (c *Connection) SetId(Id string)

type LogStreams

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

type Msg

type Msg struct {
	Msg   interface{}
	Route string
}

type QueryMsg

type QueryMsg struct {
	Route    string
	RespChan chan interface{}
}

Jump to

Keyboard shortcuts

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