relations system in juju

Vasiliy Tolstov v.tolstov at selfip.ru
Fri Nov 22 09:22:58 UTC 2013


2013/11/22 William Reade <william.reade at canonical.com>:
> Hi Vasiliy
>
> There's some moderately high-level documentation of what happens in
> doc/charms-in-action.txt in the juju-core source tree, but that doesn't
> really get into the details. If you're interested in diving through the
> code, the most fundamental piece is the state.RelationUnit type
> (state/relationunit.go): its EnterScope, LeaveScope, and Settings methods
> are responsible for the inputs into the system, and the Watch method
> (implemented in state/watcher.go) is responsible for pulling all those
> changes into a stream of events for consumption by the units. The
> worker/uniter package -- particularly relationer.go, and the relation
> subpackage -- are the clients responsible for turning that stream of events
> into actual hook executions.
>
> At heart, it all depends on Gustavo Niemeyer's mgo driver for mongodb on
> golang; we manage db changes with the mgo/txn package, and (in juju-core
> again) the state/watcher package turns the transaction log into events
> consumed by the RelationUnitsWatcher.


Thanks for detailed answer. I'm try to dig into sources =).

-- 
Vasiliy Tolstov,
e-mail: v.tolstov at selfip.ru
jabber: vase at selfip.ru



More information about the Juju mailing list