aboutsummaryrefslogtreecommitdiff
path: root/mixins.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2019-04-03 23:55:11 +0300
committerAlexander Kiryukhin <alexander@kiryukhin.su>2019-04-03 23:55:11 +0300
commit05212e50c9761181b1a2c0c9e8b43ae31fb24017 (patch)
treec25c9b189046d99a42d0b8bcc29422dc8d74d9cc /mixins.go
parent1772990500c97a79adce15c73919339d6e1618d7 (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-xmixins.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/mixins.go b/mixins.go
index 65309e4..a037561 100755
--- a/mixins.go
+++ b/mixins.go
@@ -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
+}