ReactiveX 的 Golang 实现 GoRx
- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://gitee.com/langhuihui/GoRx
- 软件文档: https://godoc.org/github.com/langhuihui/GoRx/pipe
软件介绍
ReactiveX的Golang实现版本,非官方实现版。
由于官方的RxGo一直没有进行开发,遂本人在编写rx4rx的时候受到启发,实现了golang版本的Rx库,填补了Rx在golang上的空缺。
该库实现了两种使用模式1、链式编程,2、pipe模式。使用者可以根据自己的喜好随意选择。
使用方式
类似 rxjs 5.0
import "github.com/langhuihui/gorx"
rx.Interval(1000).SkipUntil(rx.Of(1).Delay(3000)).Subscribe(func(x interface{}, dispose func()) {
fmt.Print(x)
}, nil, nil)类似 rxjs 6.0
import . "github.com/langhuihui/gorx/pipe"
Subscribe(func(x interface{}, dispose func()) {
fmt.Print(x)
}, nil, nil)(Interval(1000),SkipUntil(Of(1),Delay(3000)))
