Ubuntu Pastebin

Paste from xxx at Wed, 24 Jun 2015 05:03:24 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// WatchForEnvironConfigChanges implements EnvironConfigObserver.
func (s *fakeState) WatchForEnvironConfigChanges() (apiwatcher.NotifyWatcher, error) {
        s.mu.Lock()
        defer s.mu.Unlock()

        s.MethodCall(s, "WatchForEnvironConfigChanges")
        if err := s.NextErr(); err != nil {
                return nil, err
        }
        return s, nil
}

// EnvironConfig implements EnvironConfigObserver.
func (s *fakeState) EnvironConfig() (*config.Config, error) {
        s.mu.Lock()
        defer s.mu.Unlock()

        s.MethodCall(s, "EnvironConfig")
        if err := s.NextErr(); err != nil {
                return nil, err
        }
        return s.config, nil
}
Download as text