diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-06-15 10:20:37 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-06-15 10:20:37 +0300 |
commit | 741cf397a9150a8f76b8f74289b1dde8aaa43d02 (patch) | |
tree | 66a64d97e247b57b37d82493eb307d1bf64c7490 /README.md | |
parent | c691d422395cb72283512d8956a255db10b70b44 (diff) |
WIP: Added lifecycle mixin
Removed hooks
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -96,9 +96,9 @@ err := <- r.Errors() Disabled by default. Use `r.With(rutina.WithErrChan())` to turn on. -## Events and hooks +## Lifecycle events -Rutina has own simple lifecycle events system. You can subscribe your hooks on any of this events: +Rutina has own simple lifecycle events: * `EventRoutineStart` - Fires when starts new routine * `EventRoutineStop` - Fires when routine stopped with any result @@ -108,15 +108,6 @@ Rutina has own simple lifecycle events system. You can subscribe your hooks on a * `EventAppComplete` - Fires when all routines stopped with no errors * `EventAppFail` - Fires when all routines stopped with error -Example: - -```go -r.RegisterHook(rutina.EventRoutineStart, func(ev rutina.Event, rid int) error { - log.Println("Started routine with ID", rid) - return nil -}) -``` - ## Mixins ### Usage |