github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/worker/caasoperator/remotestate/interface.go (about) 1 // Copyright 2018 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package remotestate 5 6 import ( 7 "gopkg.in/juju/charm.v6" 8 "gopkg.in/juju/worker.v1" 9 10 "github.com/juju/juju/core/watcher" 11 ) 12 13 type Watcher interface { 14 // RemoteStateChanged returns a channel which is signalled 15 // whenever the remote state is changed. 16 RemoteStateChanged() <-chan struct{} 17 18 // Snapshot returns the current snapshot of the remote state. 19 Snapshot() Snapshot 20 21 worker.Worker 22 } 23 24 type charmGetter interface { 25 Charm(application string) (_ *charm.URL, force bool, sha256 string, vers int, _ error) 26 } 27 28 type applicationWatcher interface { 29 // Watch returns a watcher that fires when the application changes. 30 Watch(application string) (watcher.NotifyWatcher, error) 31 }