github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/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  	"github.com/juju/worker/v3"
     8  
     9  	caasoperatorapi "github.com/juju/juju/api/agent/caasoperator"
    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) (*caasoperatorapi.CharmInfo, 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  }