💥 Fusion is a tiny stream processing library written in Go.

💥 Fusion

PkgGoDevGo Report Card

Fusion is a tiny stream processing library written in Go.

See reactor for a stream processing tool built using fusion.

Features

  • Simple & lightweight.
  • Highly Composable. Compose Proc implementations in a way that is similar to middleware pattern to get concurrent processing, automatic retries etc.
  • Use for simple single node or more complex distributed setup by using different fusion.Stream and fusion.Proc implementations.
  • Zero dependencies.

Usage

A simple line counter implementation:

package main

import (
	"context"
	"fmt"
	"os"
	"sync/atomic"
	"github.com/spy16/fusion"
)

func main() {
	count := int64(0)
	runner := fusion.Runner{
      Stream: &fusion.LineStream{From: os.Stdin},
      Proc: &fusion.Fn{
      	Workers: 5,
      	Func: func(ctx context.Context, msg fusion.Msg) error {
      	  atomic.AddInt64(&count, 1)
      	  return nil
      	},
      },
	}
	_ = runner.Run(context.Background())
	fmt.Printf("Count=%d\n", count)
}
Owner
Shivaprasad Bhat
Neuroscience Enthusiast. Polyglot Programmer. Gopher.
Shivaprasad Bhat
Similar Resources

Genetic Algorithm written in go

This genetic algorithm is designed to minimise the problem specific code from a genetic algorithm. The three interfaces Gene, Initialiser, an Evaluato

Feb 15, 2022

Simple and expressive toolbox written in Go

ugo Simple and expressive toolbox written with love and care in Go. Deeply inspired by underscore.js and has the same syntax and behaviour Fully cover

Sep 27, 2022

A simplistic todo list manager written in Go

A simplistic todo list manager written in Go

Tasks Tasks is a simplistic Go webapp to manage tasks, I built this tool to manage tasks which I wanted to do, there are many good kanban style boards

Dec 10, 2022

A session manager for tmux written in Go

A session manager for tmux written in Go

Smug - tmux session manager Inspired by tmuxinator and tmuxp. Smug automates your tmux workflow. You can create a single configuration file, and Smug

Jan 6, 2023

An example client implementation written in GO to access the CyberVox platform API

About This is an example client implementation written in GO to access the CyberVox platform API.

Nov 7, 2022

Airplay 2 Receiver written in go

Go Play 2 This is a work in progress Airplay 2 Speaker implementation largely inspired by airplay2-receiver Status Can be paired manually on IOS 14.x

Dec 25, 2022

Simple 'UserKit' for Malware written in Go. Startup, Hidden Files, Critical Process and Registry Watcher

GoUserKit Simple UserKit for Malware written in Go Features Makes Process Critical (NtSetInformationProcess) Hides Files Simple Add to Startup (HKCU R

Jan 3, 2023

jacobin - A more than minimal JVM written in Go and capable of running Java 11 bytecode.

This overview gives the background on this project, including its aspirations and the features that it supports. The remaining pages discuss the basics of JVM operation and, where applicable, how Jacobin implements the various steps, noting any items that would be of particular interest to JVM cognoscenti.

Dec 29, 2022

A wrapper for the Wandbox API, written in Golang!

GoWandBox A simple wrapper for the WandBox API, written in Golang! Documentation can be found at classpythonaddike.github.io/gowandbox/ Note: This wra

Sep 19, 2021
Measurements stream joiner.

sensors Measurements stream joiner

Dec 13, 2021
A Go package to allow you to read and write from the serial port as a stream of bytes.

Serial A Go package to allow you to read and write from the serial port as a stream of bytes. Details It aims to have the same API on all platforms, i

Jan 6, 2023
Exercise for solve problem data processing, performance and something wrong in passing data

Citcall Exercise Exercise for solve problem data processing, performance and something wrong in passing data Pengolahan data data processing - Readme

Nov 25, 2021
Tidb - An open-source NewSQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads
Tidb - An open-source NewSQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads

What is TiDB? TiDB ("Ti" stands for Titanium) is an open-source NewSQL database

Jan 5, 2022
:guardsman: A teeny tiny and somewhat opinionated generator for your next golang project

A Yeoman Golang Generator We are very sorry Gophers, but other names for the generator where taken, so we choose go-lang. But we have gocreate as an a

Sep 27, 2022
Tiny 10MinuteMail wrapper for Go.

tmm Tiny package that uses 10MinuteMail to generate temporary email addresses. Zero dependancies. Supports receiving, forwarding and replying to messa

Nov 29, 2021
Randomdata : a tiny help suite for generating random data

go-randomdata randomdata is a tiny help suite for generating random data such as first names (male or female) last names full names (male or female) c

Dec 5, 2021
The Webhooks Listener-Plugin library consists of two component libraries written in GoLang

The Webhooks Listener-Plugin library consists of two component libraries written in GoLang: WebHook Listener Libraries and Plugin (Event Consumer) Libraries.

Feb 3, 2022
Library to work with MimeHeaders and another mime types. Library support wildcards and parameters.

Mime header Motivation This library created to help people to parse media type data, like headers, and store and match it. The main features of the li

Nov 9, 2022
Random fake data generator written in go
Random fake data generator written in go

Gofakeit Random data generator written in go Features 160+ Functions!!! Concurrent Global Rand Struct Generator Custom Functions Http Server Command L

Jan 1, 2023