launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/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 "launchpad.net/juju-core/state/api/params"
     7  
     8  // NotifyWatcher will send events when something changes.
     9  // It does not send content for those changes.
    10  type NotifyWatcher interface {
    11  	Changes() <-chan struct{}
    12  	Stop() error
    13  	Err() error
    14  }
    15  
    16  // StringsWatcher will send events when something changes.
    17  // The content for the changes is a list of strings.
    18  type StringsWatcher interface {
    19  	Changes() <-chan []string
    20  	Stop() error
    21  	Err() error
    22  }
    23  
    24  // RelationUnitsWatcher will send events when something changes.
    25  // The content for the changes is a params.RelationUnitsChange struct.
    26  type RelationUnitsWatcher interface {
    27  	Changes() <-chan params.RelationUnitsChange
    28  	Stop() error
    29  	Err() error
    30  }