Pipes and Unix pipes

已查看 26 次
跳至第一个未读帖子

Corentin Dupont

未读,
2017年5月23日 13:50:162017/5/23
收件人 haskel...@googlegroups.com
Hi guys!
I am wondering if Pipes can interact with Unix named pipes (or FIFO).
For example, can you combine two Unix pipes into one?

Another question, can Pipes be used for managing REST API Webhooks?
As a webhook is a sort of callback, I guess that scaling them will end up in callback hell.
Why not using an event programming library to solve this?

My ultimate goal is to create a shell script that will start a REST server with netcat.
This REST server will wait for requests from several webhooks (for example github: https://developer.github.com/v3/repos/hooks/) and combine them.

Cheers
Corentin

Gabriel Gonzalez

未读,
2017年5月26日 00:09:102017/5/26
收件人 haskell-pipes
I don't think there is a library that supports `pipes` integration with named pipes out of the box, but you could write one in principle

You can definitely use `pipes` for hooking into callback code.  See the `pipes-concurrency` library for an example of how to do this.  It basically just has the callback stuff data into a buffer than has a pipe read from that buffer

--
You received this message because you are subscribed to the Google Groups "Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-pipes+unsubscribe@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.

回复全部
回复作者
转发
0 个新帖子