diff --git a/README.md b/README.md index 2401d9f..4c841d5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Minimal event emitter using channels. - Type Safe: built on generics -- Batching: timeout and length limit +- Batching: timeout and size ### Installation ``` @@ -14,11 +14,11 @@ go get github.com/jonashiltl/emit ```go e := new(emit.Emitter) // or &emit.Emmiter{} -emit.On(e, func(t []MyEvent) { - fmt.Println(t) +emit.On(e, func(batch []MyEvent) { + fmt.Println(batch) }, WithBatchSize(10), WithTimeout(10*time.Second)) emit.Emit(e, MyEvent{}) ``` -Inspired by [mint](https://github.com/btvoidx/mint) \ No newline at end of file +Inspired by [mint](https://github.com/btvoidx/mint)