Client Facades

Eric Snow eric.snow at canonical.com
Tue Sep 16 22:49:43 UTC 2014


On Tue, Sep 16, 2014 at 4:27 PM, John Weldon <johnweldon4 at gmail.com> wrote:
> Hi;
>
> Has there been any discussion or have any decisions made about Client API
> Facades in Juju?
>
> It seems all of the Client API is exposed on one Client facade, and we'll
> just be adding more to it in rolling out Actions.
>
> I'd like to consider a new client facade just for Actions.
>
> Thoughts?

For backups I've added a new client, in its own package, rather than
adding a bunch of Backups_* methods to api/client.go (see
https://github.com/juju/juju/pull/736 and
http://reviews.vapour.ws/r/37).  FWIW, I was under the same impression
as you are that all user client functionality is captured in the one
client.  Regardless, there are several clients under the api package
that provide good examples.  Basically look at any of the subpackages
with "manager" in their name.  They (including api/client.go) all make
use of the base ClientFacade type and other code in api/base.

-eric



More information about the Juju-dev mailing list