diff options
author | Alexander Kiryukhin <alexander@kiryukhin.su> | 2019-04-03 23:55:11 +0300 |
---|---|---|
committer | Alexander Kiryukhin <alexander@kiryukhin.su> | 2019-04-03 23:55:11 +0300 |
commit | 05212e50c9761181b1a2c0c9e8b43ae31fb24017 (patch) | |
tree | c25c9b189046d99a42d0b8bcc29422dc8d74d9cc /mixins.go | |
parent | 1772990500c97a79adce15c73919339d6e1618d7 (diff) |
Added:
- Mixin with errors channel
Changed:
- Default run policy now `ShutdownIfDone` && `ShutdownIfFail`
Fixed:
- Fixed OS signals listener
- Removed some dead code
Diffstat (limited to 'mixins.go')
-rwxr-xr-x | mixins.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -39,3 +39,15 @@ func WithStdLogger() *MixinLogger { func (o MixinLogger) apply(r *Rutina) { r.logger = o.Logger } + +type MixinErrChan struct { + errCh chan error +} + +func WithErrChan(errCh chan error) *MixinErrChan { + return &MixinErrChan{errCh: errCh} +} + +func (o MixinErrChan) apply(r *Rutina) { + r.errCh = o.errCh +} |