Documentation ¶
Overview ¶
Example ¶
package main import ( "context" "fmt" "github.com/jjeffcaii/reactor-go/mono" ) func main() { gen := func(ctx context.Context, sink mono.Sink) { sink.Success("World") } mono. Create(gen). Map(func(i interface{}) interface{} { return "Hello " + i.(string) + "!" }). DoOnNext(func(v interface{}) { fmt.Println(v) }). Subscribe(context.Background()) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mono ¶
type Mono interface { rs.Publisher Filter(rs.Predicate) Mono Map(rs.Transformer) Mono FlatMap(flatMapper) Mono SubscribeOn(scheduler.Scheduler) Mono Block(context.Context) (interface{}, error) DoOnNext(rs.FnOnNext) Mono DoOnComplete(rs.FnOnComplete) Mono DoOnSubscribe(rs.FnOnSubscribe) Mono DoOnError(rs.FnOnError) Mono DoOnCancel(rs.FnOnCancel) Mono DoFinally(rs.FnOnFinally) Mono DoOnDiscard(rs.FnOnDiscard) Mono SwitchIfEmpty(alternative Mono) Mono DelayElement(delay time.Duration) Mono }
func JustOrEmpty ¶ added in v0.0.2
func JustOrEmpty(v interface{}) Mono
type Processor ¶ added in v0.0.3
func CreateProcessor ¶ added in v0.0.3
func CreateProcessor() Processor
Click to show internal directories.
Click to hide internal directories.