~fwereade/juju-core/uniter-filter-watches

« back to all changes in this revision

Viewing changes to worker/uniter/relation/hookqueue.go

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-09-25 23:11:29 UTC
  • mfrom: (561.1.9 juju-core)
  • Revision ID: fwereade@gmail.com-20120925231129-9hkgf5qtpgzegueu
state: drop RelationUnit.Pinger; consequences

This branch comprises:

* Complete removal of RelationUnit.Pinger;
* A pleasingly simple RelationUnitsWatcher et al;
* A lot of s/int/int64/ to allow for mgo/txn revnos rather than ZK versions;
* A large ugly addition to relation_test.go, ported directly from the
  original RUW tests with presence usage excised;
* Minimal changes to Relationer, using EnterScope/LeaveScope only;
* Minimal changes to tests in uniter to accommodate new Relationer;
* Extra changes in uniter_test.go to get a couple of Uniter tests passing.

R=niemeyer
CC=
https://codereview.appspot.com/6567044

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
        // version and settings hold the most recent settings known
59
59
        // to the AliveHookQueue.
60
 
        version  int
 
60
        version  int64
61
61
        settings map[string]interface{}
62
62
 
63
63
        // joined is set to true when a "relation-joined" is popped for this unit.
318
318
        tomb           tomb.Tomb
319
319
        out            chan<- hook.Info
320
320
        relationId     int
321
 
        members        map[string]int
 
321
        members        map[string]int64
322
322
        changedPending string
323
323
}
324
324
 
328
328
        q := &DyingHookQueue{
329
329
                out:            out,
330
330
                relationId:     initial.RelationId,
331
 
                members:        map[string]int{},
 
331
                members:        map[string]int64{},
332
332
                changedPending: initial.ChangedPending,
333
333
        }
334
334
        for m, v := range initial.Members {