Documentation ¶
Overview ¶
Example ¶
gen := func(ctx context.Context, sink mono.Sink) { sink.Success("World") } mono. Create(gen). Map(func(i Any) (o Any, err error) { o = "Hello " + i.(string) + "!" return }). DoOnNext(func(v Any) error { fmt.Println(v) return nil }). Subscribe(context.Background())
Output:
Index ¶
- func IsSubscribeAsync(m Mono) bool
- type Any
- type FlatMapper
- type Mono
- func Create(gen func(ctx context.Context, s Sink)) Mono
- func CreateOneshot(gen func(ctx context.Context, s Sink)) Mono
- func Delay(delay time.Duration) Mono
- func Empty() Mono
- func Error(e error) Mono
- func ErrorOneshot(e error) Mono
- func Just(v Any) Mono
- func JustOneshot(v Any) Mono
- func JustOrEmpty(v Any) Mono
- type Processor
- type Sink
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSubscribeAsync ¶ added in v0.3.1
Types ¶
type FlatMapper ¶ added in v0.2.4
type FlatMapper = func(reactor.Any) Mono
type Mono ¶
type Mono interface { reactor.Publisher Filter(reactor.Predicate) Mono Map(reactor.Transformer) Mono FlatMap(FlatMapper) Mono SubscribeOn(scheduler.Scheduler) Mono Block(context.Context) (Any, error) DoOnNext(reactor.FnOnNext) Mono DoOnComplete(reactor.FnOnComplete) Mono DoOnSubscribe(reactor.FnOnSubscribe) Mono DoOnError(reactor.FnOnError) Mono DoOnCancel(reactor.FnOnCancel) Mono DoFinally(reactor.FnOnFinally) Mono DoOnDiscard(reactor.FnOnDiscard) Mono SwitchIfEmpty(alternative Mono) Mono DelayElement(delay time.Duration) Mono Timeout(timeout time.Duration) Mono }
func ErrorOneshot ¶ added in v0.3.1
func JustOneshot ¶ added in v0.3.1
func JustOrEmpty ¶ added in v0.0.2
type Processor ¶ added in v0.0.3
func CreateProcessor ¶ added in v0.0.3
func CreateProcessor() Processor
Source Files ¶
Click to show internal directories.
Click to hide internal directories.