Alex Bramley
6e87169e2c
Make API for adding/deleting handlers more coherent.
...
Previously, it was possible to add the same handler (as returned by NewHandler)
to multiple different event lists, but DelHandler only removed a handler from
*all* event lists it was present in. This may not be wanted behaviour, and
reduces control over the event lists.
Instead, allow both Add and DelHandler to take a variadic list of events to
add or delete handlers from.
2011-11-07 13:13:46 +00:00
Alex Bramley
4853024928
Nuke extraneous makefiles, no longer needed.
2011-11-06 06:26:59 +00:00
Alex Bramley
c400a2141a
Run gofmt over code, it's been a while.
2011-09-12 23:25:09 +01:00
Alex Bramley
bb703cc945
Fix SerialDispatcher test.
2011-07-29 23:15:17 +01:00
Alex Bramley
1849d886d4
Revert "Merge branch 'master' into release"
...
This reverts commit 2528d13314
, reversing
changes made to f0a9246c7a
.
2011-07-29 23:14:21 +01:00
Alex Bramley
4994263773
Fix SerialDispatcher test.
2011-07-29 23:11:05 +01:00
Alex Bramley
dc89882bf9
Makefile for event.
2011-07-28 00:35:19 +01:00
Alex Bramley
8e6de2f3c7
Add an overridable Dispatcher to Conn, and use that to dispatch events.
2011-07-27 21:40:56 +01:00
Alex Bramley
a2b53e6fc3
Rename registry -> event for gb purposes.
2011-07-27 21:00:23 +01:00
Alex Bramley
5843974562
Make struct registry conform to EventRegistry.
2011-07-27 20:59:58 +01:00
Alex Bramley
3e82bf33c3
unit tests, sort of.
2011-07-27 17:49:55 +01:00
Alex Bramley
cce112465f
Make Handler an interface type; make dispatcher private; correctly unbox ev.
2011-07-27 17:49:34 +01:00
Alex Bramley
2c10e19f58
More abstracted event registry.
2011-07-27 16:54:49 +01:00