github.com/cloudbase/juju-core@v0.0.0-20140504232958-a7271ac7912f/state/api/watcher/interfaces.go (about) 1 // Copyright 2012, 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package watcher 5 6 import ( 7 "launchpad.net/juju-core/state/api/params" 8 ) 9 10 // NotifyWatcher will send events when something changes. 11 // It does not send content for those changes. 12 type NotifyWatcher interface { 13 Changes() <-chan struct{} 14 Stop() error 15 Err() error 16 } 17 18 // StringsWatcher will send events when something changes. 19 // The content for the changes is a list of strings. 20 type StringsWatcher interface { 21 Changes() <-chan []string 22 Stop() error 23 Err() error 24 } 25 26 // RelationUnitsWatcher will send events when something changes. 27 // The content for the changes is a params.RelationUnitsChange struct. 28 type RelationUnitsWatcher interface { 29 Changes() <-chan params.RelationUnitsChange 30 Stop() error 31 Err() error 32 }