func init() { registry.Register("github.com/trusch/horst/processors/blackhole", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { hole := &blackholeType{} hole.InitBase(id, config, mgr) return hole, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/projector", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { projector := &projectorType{data: make(chan projectorMessage, 32)} projector.InitBase(id, config, mgr) go projector.backend() return projector, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/naturals", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { naturals := &naturalsType{run: true} naturals.InitBase(id, config, mgr) go naturals.backend() return naturals, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/textsplitter", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { textsplitter := &textsplitterType{data: make(chan textsplitterMessage, 32)} textsplitter.InitBase(id, config, mgr) go textsplitter.backend() return textsplitter, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/twittersource", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { twittersource := &twittersourceType{} twittersource.InitBase(id, config, mgr) err := twittersource.getKeysFromConfig() if err != nil { return nil, err } go twittersource.backend() return twittersource, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/duplicator", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { duplicator := &duplicatorType{data: make(chan duplicatorMessage, 32)} duplicator.InitBase(id, config, mgr) numOfOutputs, ok := config.(float64) if !ok { return nil, fmt.Errorf("duplicator(%v)> config is not a number, it is %T", duplicator.ID, config) } duplicator.outputs = int(numOfOutputs) go duplicator.backend() return duplicator, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/roundrobin", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { roundrobin := &roundrobinType{data: make(chan roundrobinMessage, 32)} roundrobin.InitBase(id, config, mgr) numOfOutputs, ok := config.(float64) if !ok { return nil, fmt.Errorf("roundrobin(%v)> config is not a number, it is %T", roundrobin.ID, config) } roundrobin.outputs = int(numOfOutputs) go roundrobin.backend() return roundrobin, nil }) }
func init() { registry.Register("github.com/trusch/horst/processors/incrementalhistogram", func(id string, config interface{}, mgr horst.ProcessorManager) (horst.Processor, error) { incrementalhistogram := &incrementalhistogramType{ data: make(chan incrementalhistogramMessage, 32), histogram: make(map[string]float64), } incrementalhistogram.InitBase(id, config, mgr) err := incrementalhistogram.parseConfig() if err != nil { return nil, err } go incrementalhistogram.backend() return incrementalhistogram, nil }) }