Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasHiltl authored Jan 29, 2024
1 parent 07a7e3a commit e1e0c72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Minimal event emitter using channels.

- Type Safe: built on generics
- Batching: timeout and length limit
- Batching: timeout and size

### Installation
```
Expand All @@ -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)
Inspired by [mint](https://github.com/btvoidx/mint)

0 comments on commit e1e0c72

Please sign in to comment.