Comment 0 for bug 1032539

Revision history for this message
William Reade (fwereade) wrote :

The first client that desperately needs lifecycles to work is the unit agent, which needs to track relation lifecycle. I hope I'm not going to regret this, but I *think* that all I need is a ServiceRelationsWatcher that produces these:

type RelationsChange struct {
    Changed []*Relation
}

The initial event should contain every relation, whatever its state; subsequent ones should contain only the relations whose state has changed since the last event. I have come to the conclusion that I actually don't need separate Alive/Dying/Dead fields in the event.

(Relation needs Life and SetLife, or whatever it was we agreed on.)