~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to state/watcher/watcher.go

  • Committer: Roger Peppe
  • Date: 2012-12-03 18:42:13 UTC
  • mto: (841.1.2 197-api-passwords)
  • mto: This revision was merged to the branch mainline in revision 883.
  • Revision ID: roger.peppe@canonical.com-20121203184213-9getgnjiipl2u2hm
rpc: initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
// field is observed to change after a transaction is applied. The revno
145
145
// parameter holds the currently known revision number for the document.
146
146
// Non-existent documents are represented by a -1 revno.
147
 
func (w *Watcher) Watch(collection string, id interface{}, revno int64, ch chan<- Change) {
148
 
        if id == nil {
149
 
                panic("watcher: cannot watch a document with nil id")
150
 
        }
 
147
func (w *Watcher) Watch(collection string, id string, revno int64, ch chan<- Change) {
 
148
//      if id == nil {
 
149
//              panic("watcher: cannot watch a document with nil id")
 
150
//      }
151
151
        w.sendReq(reqWatch{watchKey{collection, id}, watchInfo{ch, revno}})
152
152
}
153
153