1206.2.1
by Martin Packman
Add copyright statement at the top of all go files bar thirdparty |
1 |
// Copyright 2012, 2013 Canonical Ltd.
|
2 |
// Licensed under the AGPLv3, see LICENCE file for details.
|
|
3 |
||
454.1.1
by Roger Peppe
worker: add WaitForEnviron |
4 |
package worker |
5 |
||
1390.2.4
by John Arbash Meinel
Handle the fact that Workers want to call watcher.MustErr if their changes is closed. |
6 |
import ( |
7 |
"launchpad.net/juju-core/state/watcher"
|
|
8 |
)
|
|
9 |
||
454.1.1
by Roger Peppe
worker: add WaitForEnviron |
10 |
var LoadedInvalid = make(chan struct{}) |
454.1.3
by Roger Peppe
gofmt |
11 |
|
454.1.1
by Roger Peppe
worker: add WaitForEnviron |
12 |
func init() { |
13 |
loadedInvalid = func() { |
|
14 |
LoadedInvalid <- struct{}{} |
|
15 |
}
|
|
16 |
}
|
|
1390.2.4
by John Arbash Meinel
Handle the fact that Workers want to call watcher.MustErr if their changes is closed. |
17 |
|
1718.1.1
by Roger Peppe
worker: fix non-nil interface bug |
18 |
func SetMustErr(f func(watcher.Errer) error) { |
19 |
if f == nil { |
|
20 |
mustErr = watcher.MustErr |
|
21 |
} else { |
|
22 |
mustErr = f |
|
23 |
}
|
|
1390.2.4
by John Arbash Meinel
Handle the fact that Workers want to call watcher.MustErr if their changes is closed. |
24 |
}
|
1572.1.1
by Dimiter Naydenov
Refactored NotifyWorker and added StringsWorker |
25 |
|
1718.1.1
by Roger Peppe
worker: fix non-nil interface bug |
26 |
func MustErr() func(watcher.Errer) error { |
27 |
return mustErr |
|
1572.1.1
by Dimiter Naydenov
Refactored NotifyWorker and added StringsWorker |
28 |
}
|