Documentation
¶
Overview ¶
Package connectable provides a Connectable and its methods.
Index ¶
- type Connectable
- func Empty() Connectable
- func From(it rx.Iterator) Connectable
- func Interval(term chan struct{}, timeout time.Duration) Connectable
- func Just(item interface{}, items ...interface{}) Connectable
- func New(buffer uint, observers ...observer.Observer) Connectable
- func Range(start, end int) Connectable
- func Start(f fx.EmittableFunc, fs ...fx.EmittableFunc) Connectable
- func (co Connectable) Connect() <-chan (chan subscription.Subscription)
- func (co Connectable) Distinct(apply fx.KeySelectorFunc) Connectable
- func (co Connectable) DistinctUntilChanged(apply fx.KeySelectorFunc) Connectable
- func (co Connectable) Do(nextf func(interface{})) Connectable
- func (co Connectable) Filter(fn fx.FilterableFunc) Connectable
- func (co Connectable) First() Connectable
- func (co Connectable) Last() Connectable
- func (co Connectable) Map(fn fx.MappableFunc) Connectable
- func (co Connectable) Scan(apply fx.ScannableFunc) Connectable
- func (co Connectable) Subscribe(handler rx.EventHandler) Connectable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connectable ¶
type Connectable struct { observable.Observable // contains filtered or unexported fields }
Connectable is an Observable which can subscribe several EventHandlers before starting processing with Connect.
func Empty ¶
func Empty() Connectable
Empty creates a Connectable with no item and terminate immediately.
func Interval ¶
func Interval(term chan struct{}, timeout time.Duration) Connectable
Interval creates a Connectable emitting incremental integers infinitely between each given time interval.
func Just ¶
func Just(item interface{}, items ...interface{}) Connectable
Just creates an Connectable with the provided item(s).
func New ¶
func New(buffer uint, observers ...observer.Observer) Connectable
New creates a Connectable with optional observer(s) as parameters.
func Range ¶
func Range(start, end int) Connectable
Range creates an Connectable that emits a particular range of sequential integers.
func Start ¶
func Start(f fx.EmittableFunc, fs ...fx.EmittableFunc) Connectable
Start creates a Connectable from one or more directive-like EmittableFunc and emits the result of each operation asynchronously on a new Connectable.
func (Connectable) Connect ¶
func (co Connectable) Connect() <-chan (chan subscription.Subscription)
Connect activates the Observable stream and returns a channel of Subscription channel.
func (Connectable) Distinct ¶
func (co Connectable) Distinct(apply fx.KeySelectorFunc) Connectable
Distinct suppress duplicate items in the original Connectable and returns a new Connectable.
func (Connectable) DistinctUntilChanged ¶
func (co Connectable) DistinctUntilChanged(apply fx.KeySelectorFunc) Connectable
DistinctUntilChanged suppress duplicate items in the original Connectable only if they are successive to one another and returns a new Connectable.
func (Connectable) Do ¶
func (co Connectable) Do(nextf func(interface{})) Connectable
Do is like Subscribe but subscribes a func(interface{}) as a NextHandler
func (Connectable) Filter ¶
func (co Connectable) Filter(fn fx.FilterableFunc) Connectable
Filter filters items in the original Connectable and returns a new Connectable with the filtered items.
func (Connectable) First ¶
func (co Connectable) First() Connectable
First returns new Connectable which emits only first item.
func (Connectable) Last ¶
func (co Connectable) Last() Connectable
Last returns a new Connectable which emits only last item.
func (Connectable) Map ¶
func (co Connectable) Map(fn fx.MappableFunc) Connectable
Map maps a MappableFunc predicate to each item in Connectable and returns a new Connectable with applied items.
func (Connectable) Scan ¶
func (co Connectable) Scan(apply fx.ScannableFunc) Connectable
Scan applies ScannableFunc predicate to each item in the original Connectable sequentially and emits each successive value on a new Connectable.
func (Connectable) Subscribe ¶
func (co Connectable) Subscribe(handler rx.EventHandler) Connectable
Subscribe subscribes an EventHandler and returns a Connectable.