Documentation ¶
Index ¶
- Constants
- Variables
- func NewCache() blocks.BlockInterface
- func NewCount() blocks.BlockInterface
- func NewDeDupe() blocks.BlockInterface
- func NewFilter() blocks.BlockInterface
- func NewFromEmail() blocks.BlockInterface
- func NewFromFile() blocks.BlockInterface
- func NewFromHTTPStream() blocks.BlockInterface
- func NewFromNSQ() blocks.BlockInterface
- func NewFromPost() blocks.BlockInterface
- func NewFromSQS() blocks.BlockInterface
- func NewFromUDP() blocks.BlockInterface
- func NewFromWebsocket() blocks.BlockInterface
- func NewGaussian() blocks.BlockInterface
- func NewGetHTTP() blocks.BlockInterface
- func NewHistogram() blocks.BlockInterface
- func NewJoin() blocks.BlockInterface
- func NewKullbackLeibler() blocks.BlockInterface
- func NewLearn() blocks.BlockInterface
- func NewLinearModel() blocks.BlockInterface
- func NewListenerUDP(block blocks.BlockInterface, connectionString string, out chan []byte) (*listenerUDP, error)
- func NewLogisticModel() blocks.BlockInterface
- func NewMap() blocks.BlockInterface
- func NewMask() blocks.BlockInterface
- func NewMovingAverage() blocks.BlockInterface
- func NewPack() blocks.BlockInterface
- func NewParseXML() blocks.BlockInterface
- func NewPoisson() blocks.BlockInterface
- func NewPoissonSampler(λ float64) func() int
- func NewQueue() blocks.BlockInterface
- func NewSet() blocks.BlockInterface
- func NewSkeleton() blocks.BlockInterface
- func NewSync() blocks.BlockInterface
- func NewTicker() blocks.BlockInterface
- func NewTimeseries() blocks.BlockInterface
- func NewToBeanstalkd() blocks.BlockInterface
- func NewToElasticsearch() blocks.BlockInterface
- func NewToEmail() blocks.BlockInterface
- func NewToFile() blocks.BlockInterface
- func NewToLog() blocks.BlockInterface
- func NewToMongoDB() blocks.BlockInterface
- func NewToNSQ() blocks.BlockInterface
- func NewToNSQMulti() blocks.BlockInterface
- func NewToggle() blocks.BlockInterface
- func NewUnpack() blocks.BlockInterface
- func NewZipf() blocks.BlockInterface
- func Start()
- type Cache
- type Count
- type DeDupe
- type Filter
- type FromEmail
- type FromFile
- type FromHTTPStream
- type FromNSQ
- type FromPost
- type FromSQS
- type FromUDP
- type FromWebsocket
- type Gaussian
- type GetHTTP
- type Histogram
- type Join
- type KullbackLeibler
- type Learn
- type LinearModel
- type LogisticModel
- type Map
- type Mask
- type MovingAverage
- type PQMessage
- type Pack
- type ParseXML
- type Poisson
- type PriorityQueue
- func (pq PriorityQueue) Len() int
- func (pq PriorityQueue) Less(i, j int) bool
- func (pq *PriorityQueue) Peek() interface{}
- func (pq *PriorityQueue) PeekAndShift(max time.Time, lag time.Duration) (interface{}, time.Duration)
- func (pq *PriorityQueue) Pop() interface{}
- func (pq *PriorityQueue) Push(x interface{})
- func (pq PriorityQueue) Swap(i, j int)
- type Queue
- type Set
- type Skeleton
- type Sync
- type Ticker
- type Timeseries
- type ToBeanstalkd
- type ToElasticsearch
- type ToEmail
- type ToFile
- type ToLog
- type ToMongoDB
- type ToNSQ
- type ToNSQMulti
- type Toggle
- type Unpack
- type Zipf
Constants ¶
const (
MAX_UDP_MESSAGE_SIZE = 1024
)
Variables ¶
var BlockDefs = map[string]*blocks.BlockDef{}
var Blocks = map[string]func() blocks.BlockInterface{ "count": NewCount, "toggle": NewToggle, "movingaverage": NewMovingAverage, "ticker": NewTicker, "fromnsq": NewFromNSQ, "fromhttpstream": NewFromHTTPStream, "fromsqs": NewFromSQS, "frompost": NewFromPost, "fromfile": NewFromFile, "fromemail": NewFromEmail, "tonsq": NewToNSQ, "toelasticsearch": NewToElasticsearch, "toemail": NewToEmail, "tofile": NewToFile, "tolog": NewToLog, "tobeanstalkd": NewToBeanstalkd, "tomongodb": NewToMongoDB, "mask": NewMask, "filter": NewFilter, "sync": NewSync, "queue": NewQueue, "unpack": NewUnpack, "pack": NewPack, "parsexml": NewParseXML, "set": NewSet, "cache": NewCache, "join": NewJoin, "kullbackleibler": NewKullbackLeibler, "learn": NewLearn, "logisticModel": NewLogisticModel, "linearModel": NewLinearModel, "gethttp": NewGetHTTP, "gaussian": NewGaussian, "zipf": NewZipf, "poisson": NewPoisson, "map": NewMap, "histogram": NewHistogram, "timeseries": NewTimeseries, "fromwebsocket": NewFromWebsocket, "tonsqmulti": NewToNSQMulti, "fromudp": NewFromUDP, "dedupe": NewDeDupe, }
Functions ¶
func NewCache ¶ added in v0.2.3
func NewCache() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewDeDupe ¶ added in v0.2.3
func NewDeDupe() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewFromEmail ¶ added in v0.2.4
func NewFromEmail() blocks.BlockInterface
NewFromEmail is a simple factory for streamtools to make new blocks of this kind. By default, the block is configured for GMail.
func NewFromFile ¶ added in v0.2.3
func NewFromFile() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewFromHTTPStream ¶
func NewFromHTTPStream() blocks.BlockInterface
a bit of boilerplate for streamtools
func NewFromPost ¶
func NewFromPost() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewFromSQS ¶
func NewFromSQS() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewFromUDP ¶
func NewFromUDP() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewFromWebsocket ¶
func NewFromWebsocket() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewGaussian ¶
func NewGaussian() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewGetHTTP ¶
func NewGetHTTP() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewHistogram ¶
func NewHistogram() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewJoin ¶
func NewJoin() blocks.BlockInterface
func NewKullbackLeibler ¶ added in v0.2.4
func NewKullbackLeibler() blocks.BlockInterface
func NewLearn ¶ added in v0.2.4
func NewLearn() blocks.BlockInterface
a bit of boilerplate for streamtools
func NewLinearModel ¶ added in v0.2.4
func NewLinearModel() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewListenerUDP ¶
func NewListenerUDP(block blocks.BlockInterface, connectionString string, out chan []byte) (*listenerUDP, error)
func NewLogisticModel ¶ added in v0.2.4
func NewLogisticModel() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewMap ¶
func NewMap() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewMovingAverage ¶
func NewMovingAverage() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewPack ¶
func NewPack() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewParseXML ¶ added in v0.2.3
func NewParseXML() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewPoisson ¶
func NewPoisson() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewPoissonSampler ¶
func NewQueue ¶ added in v0.2.3
func NewQueue() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewSet ¶
func NewSet() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewSkeleton ¶
func NewSkeleton() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewSync ¶
func NewSync() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewTicker ¶
func NewTicker() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewTimeseries ¶
func NewTimeseries() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToBeanstalkd ¶
func NewToBeanstalkd() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToElasticsearch ¶
func NewToElasticsearch() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToEmail ¶ added in v0.2.4
func NewToEmail() blocks.BlockInterface
NewToEmail is a simple factory for streamtools to make new blocks of this kind. By default, the block is configured for GMail.
func NewToFile ¶
func NewToFile() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToLog ¶
func NewToLog() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToMongoDB ¶ added in v0.2.3
func NewToMongoDB() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewToNSQMulti ¶
func NewToNSQMulti() blocks.BlockInterface
a bit of boilerplate for streamtools
func NewToggle ¶ added in v0.2.3
func NewToggle() blocks.BlockInterface
a bit of boilerplate for streamtools
func NewUnpack ¶
func NewUnpack() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
func NewZipf ¶
func NewZipf() blocks.BlockInterface
we need to build a simple factory so that streamtools can make new blocks of this kind
Types ¶
type Cache ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type DeDupe ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type FromEmail ¶ added in v0.2.4
FromEmail holds channels we're going to use to communicate with streamtools, credentials for authenticating with an IMAP server and the IMAP client.
type FromFile ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type FromHTTPStream ¶
specify those channels we're going to use to communicate with streamtools
func (*FromHTTPStream) Run ¶
func (b *FromHTTPStream) Run()
creates a persistent HTTP connection, emitting all messages from the stream into streamtools
func (*FromHTTPStream) Setup ¶
func (b *FromHTTPStream) Setup()
type FromNSQ ¶
specify those channels we're going to use to communicate with streamtools
type FromPost ¶
specify those channels we're going to use to communicate with streamtools
type FromSQS ¶
specify those channels we're going to use to communicate with streamtools
type FromUDP ¶
specify those channels we're going to use to communicate with streamtools
type FromWebsocket ¶
specify those channels we're going to use to communicate with streamtools
func (*FromWebsocket) Run ¶
func (b *FromWebsocket) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*FromWebsocket) Setup ¶
func (b *FromWebsocket) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type Gaussian ¶
specify those channels we're going to use to communicate with streamtools
type GetHTTP ¶
specify those channels we're going to use to communicate with streamtools
type Histogram ¶
specify those channels we're going to use to communicate with streamtools
type KullbackLeibler ¶ added in v0.2.4
func (*KullbackLeibler) Run ¶ added in v0.2.4
func (b *KullbackLeibler) Run()
func (*KullbackLeibler) Setup ¶ added in v0.2.4
func (b *KullbackLeibler) Setup()
type LinearModel ¶ added in v0.2.4
specify those channels we're going to use to communicate with streamtools
func (*LinearModel) Run ¶ added in v0.2.4
func (b *LinearModel) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*LinearModel) Setup ¶ added in v0.2.4
func (b *LinearModel) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type LogisticModel ¶ added in v0.2.4
specify those channels we're going to use to communicate with streamtools
func (*LogisticModel) Run ¶ added in v0.2.4
func (b *LogisticModel) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*LogisticModel) Setup ¶ added in v0.2.4
func (b *LogisticModel) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type Map ¶
specify those channels we're going to use to communicate with streamtools
type Mask ¶
specify those channels we're going to use to communicate with streamtools
func (*Mask) Run ¶
func (b *Mask) Run()
Mask modifies a JSON stream with an additive key filter. Mask uses the JSON object recieved through the rule channel to determine which keys should be included in the resulting object. An empty JSON object ({}) is used as the notation to include all values for a key.
For instance, if the JSON rule is:
{"a":{}, "b":{"d":{}},"x":{}}
And an incoming message looks like:
{"a":24, "b":{"c":"test", "d":[1,3,4]}, "f":5, "x":{"y":5, "z":10}}
The resulting object after the application of Mask would be:
{"a":24, "b":{"d":[1,3,4]}, "x":{"y":5, "z":10}}
type MovingAverage ¶
specify those channels we're going to use to communicate with streamtools
func (*MovingAverage) Run ¶
func (b *MovingAverage) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*MovingAverage) Setup ¶
func (b *MovingAverage) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type Pack ¶
specify those channels we're going to use to communicate with streamtools
type ParseXML ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type PriorityQueue ¶
type PriorityQueue []*PQMessage
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Peek ¶ added in v0.2.3
func (pq *PriorityQueue) Peek() interface{}
func (*PriorityQueue) PeekAndShift ¶
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
type Queue ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type Set ¶
specify those channels we're going to use to communicate with streamtools
type Skeleton ¶
specify those channels we're going to use to communicate with streamtools
type Sync ¶
specify those channels we're going to use to communicate with streamtools
type Ticker ¶
specify those channels we're going to use to communicate with streamtools
type Timeseries ¶
specify those channels we're going to use to communicate with streamtools
func (*Timeseries) Run ¶
func (b *Timeseries) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*Timeseries) Setup ¶
func (b *Timeseries) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type ToBeanstalkd ¶
specify those channels we're going to use to communicate with streamtools
func (*ToBeanstalkd) Run ¶
func (b *ToBeanstalkd) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
func (*ToBeanstalkd) Setup ¶
func (b *ToBeanstalkd) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type ToElasticsearch ¶
specify those channels we're going to use to communicate with streamtools
func (*ToElasticsearch) Run ¶
func (b *ToElasticsearch) Run()
Run is the block's main loop. Here we listen on the different channels we set up. This block posts a message to a specified Elasticsearch index with the given type.
func (*ToElasticsearch) Setup ¶
func (b *ToElasticsearch) Setup()
Setup is called once before running the block. We build up the channels and specify what kind of block this is.
type ToEmail ¶ added in v0.2.4
ToEmail holds channels we're going to use to communicate with streamtools, credentials for authenticating with an SMTP server and the to, from and subject for the email message.
func (*ToEmail) Run ¶ added in v0.2.4
func (e *ToEmail) Run()
Run is the block's main loop. Here we listen on the different channels we set up.
type ToFile ¶
specify those channels we're going to use to communicate with streamtools
type ToLog ¶
specify those channels we're going to use to communicate with streamtools
type ToMongoDB ¶ added in v0.2.3
specify those channels we're going to use to communicate with streamtools
type ToNSQ ¶
specify those channels we're going to use to communicate with streamtools
type ToNSQMulti ¶
specify those channels we're going to use to communicate with streamtools
func (*ToNSQMulti) Run ¶
func (b *ToNSQMulti) Run()
connects to an NSQ topic and emits each message into streamtools.
func (*ToNSQMulti) Setup ¶
func (b *ToNSQMulti) Setup()
type Unpack ¶
specify those channels we're going to use to communicate with streamtools
type Zipf ¶
specify those channels we're going to use to communicate with streamtools
func (*Zipf) Run ¶
func (b *Zipf) Run()
Run is the block's main loop. Here we listen on the different channels we set up. this is actually the Zipf-Manadlebrot "law". http://en.wikipedia.org/wiki/Zipf%E2%80%93Mandelbrot_law the parameter `v` is denoted `q` on wikipedia.
Source Files ¶
- cache.go
- count.go
- dedupe.go
- filter.go
- fromEmail.go
- fromFile.go
- fromHTTPStream.go
- fromNSQ.go
- fromPost.go
- fromSQS.go
- fromUDP.go
- fromWebsocket.go
- gaussian.go
- getHTTP.go
- histogram.go
- join.go
- kullbackLeibler.go
- learn.go
- library.go
- linearModel.go
- logisticModel.go
- map.go
- mask.go
- movingAverage.go
- pack.go
- parseXML.go
- poisson.go
- priority_queue.go
- queue.go
- set.go
- skeleton_block.go
- sync.go
- ticker.go
- timeseries.go
- toBeanstalkd.go
- toElasticsearch.go
- toEmail.go
- toFile.go
- toMongoDB.go
- toNSQ.go
- toNSQMulti.go
- toggle.go
- tolog.go
- unpack.go
- zipf.go