Method
setHandler
(actions []events.Action, handler func(context.Context, events.Message))
Source from the content-addressed store, hash-verified
| 375 | } |
| 376 | |
| 377 | func (eh *eventHandler) setHandler(actions []events.Action, handler func(context.Context, events.Message)) { |
| 378 | for _, action := range actions { |
| 379 | eh.handlers[action] = handler |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | // watch ranges over the passed in event chan and processes the events based on the |
| 384 | // handlers created for a given action. |
Tested by
no test coverage detected