Releases: ReactiveX/RxGo
Releases · ReactiveX/RxGo
v2.0.0-beta.2
Installation
go get -u github.com/reactivex/rxgo/[email protected]
Release
- Emphasis on the documentation (update of the README, /doc folder containing the documentation for each operator)
- Connectable Observable (see README documentation)
- Serialize option. To be used in coordination with
rxgo.WithPool(n)
option.
Basically, if we want for example to spin up n goroutines to handle a map operation but guarantee that the items will still be emitted sequentially, we can do this:
Map(func(_ context.Context, item interface{}) (interface{}, error) {
// Map implementation
},
// Create multiple instances of the map operator
rxgo.WithPool(pool),
// Serialize the items emitted by their Customer.ID
rxgo.Serialize(func(item interface{}) int {
customer := item.(Customer)
return customer.ID
}), rxgo.WithBufferedChannel(1))
- New
Join
operator (thanks to @v-zubko) - Update of the
Just
operator for more syntactic sugar (allows to pass variadic arguments for the items and the options)
Example:
rxgo.Just(1, 2, 3)(rxgo.WithContext(ctx), rxgo.WithBufferedChannel(5))
- Couple of fixes (missing context propagation mainly) and minor changes
- Improvements of the unit tests (using, for example, a deterministic time API; see #233 (comment))
v2.0.0-beta.1
Installation
go get -u github.com/reactivex/rxgo/[email protected]
Release
General
- Hot vs cold observable (see readme)
- Backpressure management (see readme)
- Lazy vs eager observation (see readme)
- Sequential vs parallel operators (see readme)
New Operators
- All
- Amb
- Average
- BackOffRetry
- Buffer
- Catch
- CombineLatest
- Concat
- Contains
- Count
- Debounce
- DefaultIfEmpty
- Defer
- ElementAt
- Error
- FirstOrDefault
- FromEventSource
- GroupBy
- IgnoreElements
- Interval
- LastOrDefault
- Marshal
- Max
- Merge
- Min
- Never
- Range
- Reduce
- Retry
- Run
- Sample
- Scan
- SequenceEqual
- Send
- Serialize
- SkipWhile
- StartWith
- Sum
- TakeUntil
- TakeWhile
- TimeInterval
- Timestamp
- Thrown
- Timer
- ToMap
- ToMapWithValueSelector
- ToSlice
- Unmarshal
- Window
- ZipFromIterable
In total, the v2 contains 87 different operators.
Make sure to check the documentation (develop
branch) and to raise any issues you'd find out!