Cole Brown
798a70679b
Return error rather than panic in Emit
2019-07-30 15:51:57 -04:00
Łukasz Magiera
7d8a9553e1
Merge pull request #17 from libp2p/fix/with-node
...
nit: fix with-node
2019-06-28 00:40:03 +02:00
Steven Allen
02effd2819
fix: serialize publishing
...
Ensure that all subscribers see events in the same order. This also ensures that
the subscribers never see the initial "latest" event after some other event.
fixes #16
2019-06-27 22:34:44 +02:00
Steven Allen
ee68e8c4fa
fix: completely drain on close
...
Issue: We could partially drain and end up with, e.g., a close event missing a
matching open event.
2019-06-27 20:17:04 +02:00
Steven Allen
edaaa65b97
nit: fix with-node
...
1. It doesn't return an error and we weren't checking it anyways.
2. Avoid a goroutine unless we need it.
2019-06-27 20:13:36 +02:00
Steven Allen
a42ace6316
Merge pull request #11 from libp2p/fix/things
...
Fix close deadlock and Sub type error
2019-06-27 20:13:09 +02:00
Steven Allen
1c05f12d97
nit: avoid ValueOf
...
We only need TypeOf.
2019-06-27 19:20:43 +02:00
Jakub Sztandera
7750ab73c5
Enable buffering by default
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-06-25 20:47:02 +02:00
Łukasz Magiera
de37ea9063
fix close deadlock and Sub type error
2019-06-22 12:05:03 +02:00
Łukasz Magiera
a3f161b18e
refactor interfaces ( #9 )
2019-06-21 17:50:36 +01:00
Raúl Kripalani
c6ab7baea5
rename eventbus package. ( #4 )
2019-06-19 16:55:25 +01:00
Raúl Kripalani
a214a1be4f
remove superfluous types.
2019-06-19 16:13:28 +01:00
Raúl Kripalani
b9fe91677a
make Emitter an interface.
2019-06-19 16:10:03 +01:00
Łukasz Magiera
ee0cf463ce
Drop the interface
2019-06-19 15:36:31 +02:00
Łukasz Magiera
e4cf01bb28
BasicBus to basicBus
2019-06-19 15:00:22 +02:00
Łukasz Magiera
8a6f8f9f88
return struct from NewBus
2019-06-19 14:48:41 +02:00
Łukasz Magiera
33ccec5392
Move close to EmitFunc
2019-06-19 14:27:37 +02:00
Łukasz Magiera
beb94094e9
Address @stebalien's review
2019-06-19 14:22:10 +02:00
Łukasz Magiera
21e43859b6
Use reflect.Type in node map
2019-06-19 13:51:25 +02:00
Łukasz Magiera
e8cf02cfdf
Simplify withNode a bit
2019-06-19 12:31:36 +02:00
Łukasz Magiera
c653488de9
Fix data races
2019-06-19 12:13:18 +02:00
Łukasz Magiera
db5502986d
Stateful emits
2019-06-16 21:42:47 +02:00
Jakub Sztandera
1e198f4825
Use slice instead of map
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-06-16 19:20:10 +02:00
Łukasz Magiera
af4305fbb4
Gofmt
2019-06-16 19:20:10 +02:00
Łukasz Magiera
25d453370e
ForceSubType
2019-06-16 18:15:35 +02:00
Łukasz Magiera
056412681f
Subscribe with user provided typed channels
2019-06-16 17:20:33 +02:00
Łukasz Magiera
eba14f59e2
POC SendTo
2019-06-14 18:57:21 +02:00
Łukasz Magiera
b7ad393cac
Address @bigs review
2019-06-13 22:25:53 +02:00
Łukasz Magiera
fae8970e49
Placeholder for options in the interface
2019-06-13 10:04:12 +02:00
Łukasz Magiera
3f45d5bab0
MVP
2019-06-13 08:51:54 +02:00
Łukasz Magiera
4e8b8db0e8
Initial implementation
2019-06-13 04:23:03 +02:00