🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/AndreasChristianson/gopher-pipes

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/AndreasChristianson/gopher-pipes

v0.5.4
Source
Go
Version published
Created
Source

Gopher Pipes

main-build coverage Go Reference

Simple source/sink abstraction around generator functions, channels, and observing.

Import

go get github.com/AndreasChristianson/gopher-pipes

Usage

see the examples folder for more examples.

simple

This example creates a source with four strings, observes them, and prints the observed strings. Verbose logging is enabled.

package main

import (
	"fmt"
	"github.com/AndreasChristianson/gopher-pipes/reactive"
)

func main() {
	pipe := reactive.Just("Hello", " ", "world", "!\n")
	pipe.Observe(func(item string) error {
		fmt.Print(item)
		return nil
	})
	pipe.Start()
	pipe.AwaitCompletion()
}

complicated

This example polls a persistent redis stream via XREAD and routes messages to a websocket

// todo

FAQs

Package last updated on 21 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts